yuyeon 0.0.41 → 0.0.42-rc2
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/style.css +1 -1
- package/dist/yuyeon.js +4874 -3041
- package/dist/yuyeon.umd.cjs +8 -4
- package/lib/components/button/YButton.scss +2 -1
- package/lib/components/date-picker/YDateCalendar.mjs +235 -5
- package/lib/components/date-picker/YDateCalendar.mjs.map +1 -1
- package/lib/components/date-picker/YDateCalendar.scss +82 -0
- package/lib/components/date-picker/YDatePicker.mjs.map +1 -1
- package/lib/components/date-picker/YDatePickerControl.mjs +29 -0
- package/lib/components/date-picker/YDatePickerControl.mjs.map +1 -0
- package/lib/components/date-picker/YDatePickerControl.scss +3 -0
- package/lib/components/date-picker/index.mjs +1 -1
- package/lib/components/date-picker/index.mjs.map +1 -1
- package/lib/components/divider/YDivider.mjs +4 -2
- package/lib/components/divider/YDivider.mjs.map +1 -1
- package/lib/components/index.mjs +2 -0
- package/lib/components/index.mjs.map +1 -1
- package/lib/components/input/YInput.mjs +1 -1
- package/lib/components/input/YInput.mjs.map +1 -1
- package/lib/components/layer/YLayer.mjs.map +1 -1
- package/lib/components/list/YList.mjs.map +1 -1
- package/lib/components/menu/YMenu.mjs +2 -2
- package/lib/components/menu/YMenu.mjs.map +1 -1
- package/lib/components/select/YSelect.mjs.map +1 -1
- package/lib/components/switch/YSwitch.mjs +2 -0
- package/lib/components/switch/YSwitch.mjs.map +1 -1
- package/lib/components/table/composibles/pagination.mjs.map +1 -1
- package/lib/components/tooltip/YTooltip.mjs +2 -2
- package/lib/components/tooltip/YTooltip.mjs.map +1 -1
- package/lib/components/tree-view/YTreeView.mjs +5 -0
- package/lib/components/tree-view/YTreeView.mjs.map +1 -1
- package/lib/components/tree-view/YTreeViewNode.mjs +1 -0
- package/lib/components/tree-view/YTreeViewNode.mjs.map +1 -1
- package/lib/composables/communication.mjs +9 -0
- package/lib/composables/communication.mjs.map +1 -1
- package/lib/composables/date/factory.mjs +12 -0
- package/lib/composables/date/factory.mjs.map +1 -0
- package/lib/composables/date/index.mjs +19 -1
- package/lib/composables/date/index.mjs.map +1 -1
- package/lib/composables/date/setting.mjs +11 -0
- package/lib/composables/date/setting.mjs.map +1 -0
- package/lib/composables/date/types.mjs +1 -1
- package/lib/composables/date/types.mjs.map +1 -1
- package/lib/composables/i18n/index.mjs +30 -0
- package/lib/composables/i18n/index.mjs.map +1 -0
- package/lib/composables/i18n/locale.mjs +5 -0
- package/lib/composables/i18n/locale.mjs.map +1 -0
- package/lib/composables/i18n/rtl.mjs +34 -0
- package/lib/composables/i18n/rtl.mjs.map +1 -0
- package/lib/composables/i18n/share.mjs +2 -0
- package/lib/composables/i18n/share.mjs.map +1 -0
- package/lib/composables/index.mjs +1 -0
- package/lib/composables/index.mjs.map +1 -1
- package/lib/composables/theme/index.mjs.map +1 -1
- package/lib/composables/transition.mjs.map +1 -1
- package/lib/i18n/built-in.mjs +77 -0
- package/lib/i18n/built-in.mjs.map +1 -0
- package/lib/i18n/config.mjs +82 -0
- package/lib/i18n/config.mjs.map +1 -0
- package/lib/i18n/types.mjs +2 -0
- package/lib/i18n/types.mjs.map +1 -0
- package/lib/index.mjs +21 -5
- package/lib/index.mjs.map +1 -1
- package/lib/locales/en.mjs +4 -0
- package/lib/locales/en.mjs.map +1 -0
- package/lib/locales/index.mjs +3 -0
- package/lib/locales/index.mjs.map +1 -0
- package/lib/locales/ko.mjs +4 -0
- package/lib/locales/ko.mjs.map +1 -0
- package/lib/styles/util/_mixin.scss +34 -0
- package/lib/util/date/adapters/yuyeon-date-adapter.mjs +99 -0
- package/lib/util/date/adapters/yuyeon-date-adapter.mjs.map +1 -0
- package/lib/util/date/built-in.mjs +12 -102
- package/lib/util/date/built-in.mjs.map +1 -1
- package/lib/util/date/index.mjs +1 -0
- package/lib/util/date/index.mjs.map +1 -1
- package/lib/util/date/types.mjs.map +1 -1
- package/lib/util/index.mjs +1 -0
- package/lib/util/index.mjs.map +1 -1
- package/package.json +6 -4
- package/types/components/date-picker/YDateCalendar.d.ts +136 -0
- package/types/components/date-picker/index.d.ts +1 -0
- package/types/components/dialog/YDialog.d.ts +2 -2
- package/types/components/index.d.ts +2 -0
- package/types/components/input/YInput.d.ts +2 -2
- package/types/components/layer/YLayer.d.ts +3 -3
- package/types/components/list/YList.d.ts +3 -3
- package/types/components/list/YListItem.d.ts +3 -3
- package/types/components/menu/YMenu.d.ts +5 -5
- package/types/components/select/YSelect.d.ts +6 -6
- package/types/components/tooltip/YTooltip.d.ts +4 -4
- package/types/components/tree-view/YTreeView.d.ts +3 -0
- package/types/components/tree-view/YTreeViewNode.d.ts +8 -0
- package/types/composables/communication.d.ts +2 -0
- package/types/composables/date/factory.d.ts +2 -0
- package/types/composables/date/index.d.ts +11 -0
- package/types/composables/date/setting.d.ts +4 -0
- package/types/composables/date/types.d.ts +12 -0
- package/types/composables/i18n/index.d.ts +8 -0
- package/types/composables/i18n/locale.d.ts +2 -0
- package/types/composables/i18n/rtl.d.ts +20 -0
- package/types/composables/i18n/share.d.ts +1 -0
- package/types/composables/index.d.ts +2 -0
- package/types/composables/theme/index.d.ts +3 -3
- package/types/i18n/built-in.d.ts +2 -0
- package/types/i18n/config.d.ts +81 -0
- package/types/i18n/types.d.ts +19 -0
- package/types/locales/en.d.ts +4 -0
- package/types/shims.d.ts +2 -0
- package/types/util/date/adapters/yuyeon-date-adapter.d.ts +38 -0
- package/types/util/date/built-in.d.ts +35 -0
- package/types/util/date/index.d.ts +3 -0
- package/types/util/date/types.d.ts +163 -0
- package/types/util/index.d.ts +1 -0
|
@@ -8,6 +8,7 @@ $button-disabled-background: #d3d3d3 !default;
|
|
|
8
8
|
.y-button {
|
|
9
9
|
--y-button__color: var(--y-theme-primary);
|
|
10
10
|
--y-button__text-color: var(--y-theme-on-primary);
|
|
11
|
+
--y-button__disabled-background: #{$button-disabled-background};
|
|
11
12
|
|
|
12
13
|
cursor: pointer;
|
|
13
14
|
display: inline-flex;
|
|
@@ -57,7 +58,7 @@ $button-disabled-background: #d3d3d3 !default;
|
|
|
57
58
|
|
|
58
59
|
&:disabled,
|
|
59
60
|
&--disabled {
|
|
60
|
-
background-color:
|
|
61
|
+
background-color: var(--y-button__disabled-background);
|
|
61
62
|
opacity: 0.4;
|
|
62
63
|
cursor: default;
|
|
63
64
|
box-shadow: none;
|
|
@@ -1,12 +1,242 @@
|
|
|
1
|
-
import { createVNode as _createVNode } from "vue";
|
|
2
|
-
import { defineComponent } from 'vue';
|
|
1
|
+
import { mergeProps as _mergeProps, Fragment as _Fragment, createVNode as _createVNode } from "vue";
|
|
2
|
+
import { computed, defineComponent, ref } from 'vue';
|
|
3
|
+
import { useModelDuplex } from "../../composables/communication.mjs";
|
|
3
4
|
import { useRender } from "../../composables/component.mjs";
|
|
5
|
+
import { useDate } from "../../composables/date/index.mjs";
|
|
6
|
+
import { useI18n } from "../../composables/i18n/index.mjs";
|
|
7
|
+
import { wrapInArray } from "../../util/index.mjs";
|
|
8
|
+
import { propsFactory } from "../../util/vue-component.mjs";
|
|
9
|
+
import { YButton } from "../button/index.mjs";
|
|
10
|
+
import "./YDateCalendar.scss";
|
|
11
|
+
export const pressYDateCalendarPropsOptions = propsFactory({
|
|
12
|
+
year: [Number, String],
|
|
13
|
+
month: [Number, String],
|
|
14
|
+
modelValue: Array,
|
|
15
|
+
multiple: Boolean,
|
|
16
|
+
range: Boolean,
|
|
17
|
+
allowedDates: [Array, Function],
|
|
18
|
+
max: null,
|
|
19
|
+
min: null,
|
|
20
|
+
disabled: Boolean,
|
|
21
|
+
color: String,
|
|
22
|
+
hideWeekdays: Boolean,
|
|
23
|
+
showAdjacentMonthDates: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: true
|
|
26
|
+
},
|
|
27
|
+
hideHeader: Boolean
|
|
28
|
+
}, 'YDateCalendar');
|
|
4
29
|
export const YDateCalendar = defineComponent({
|
|
5
30
|
name: 'YDateCalendar',
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
31
|
+
props: pressYDateCalendarPropsOptions(),
|
|
32
|
+
emits: {
|
|
33
|
+
'update:modelValue': date => true,
|
|
34
|
+
'update:year': date => true,
|
|
35
|
+
'update:month': date => true
|
|
36
|
+
},
|
|
37
|
+
setup(props, _ref) {
|
|
38
|
+
let {
|
|
39
|
+
slots
|
|
40
|
+
} = _ref;
|
|
41
|
+
const dateUtil = useDate();
|
|
42
|
+
const i18n = useI18n();
|
|
43
|
+
const container$ = ref();
|
|
44
|
+
const day$ = ref([]);
|
|
45
|
+
const model = useModelDuplex(props, 'modelValue', [], v => wrapInArray(v));
|
|
46
|
+
const displayValue = computed(() => {
|
|
47
|
+
if (model.value.length > 0) return dateUtil.date(model.value[0]);
|
|
48
|
+
if (props.min) return dateUtil.date(props.min);
|
|
49
|
+
if (Array.isArray(props.allowedDates)) {
|
|
50
|
+
return dateUtil.date(props.allowedDates[0]);
|
|
51
|
+
}
|
|
52
|
+
return dateUtil.date();
|
|
9
53
|
});
|
|
54
|
+
const year = useModelDuplex(props, 'year', undefined, v => {
|
|
55
|
+
const value = v != null ? Number(v) : dateUtil.getYear(displayValue.value);
|
|
56
|
+
return dateUtil.startOfYear(dateUtil.setYear(dateUtil.date(), value));
|
|
57
|
+
}, v => dateUtil.getYear(v));
|
|
58
|
+
const month = useModelDuplex(props, 'month', undefined, v => {
|
|
59
|
+
const value = v != null ? Number(v) : dateUtil.getMonth(displayValue.value);
|
|
60
|
+
const date = dateUtil.setYear(dateUtil.date(), dateUtil.getYear(year.value));
|
|
61
|
+
return dateUtil.setMonth(date, value);
|
|
62
|
+
}, v => dateUtil.getMonth(v));
|
|
63
|
+
const weeksInMonth = computed(() => {
|
|
64
|
+
const weeks = dateUtil.getWeekArray(month.value);
|
|
65
|
+
const days = weeks.flat();
|
|
66
|
+
const daysInMonth = 6 * 7;
|
|
67
|
+
if (days.length < daysInMonth) {
|
|
68
|
+
const lastDay = days[days.length - 1];
|
|
69
|
+
let week = [];
|
|
70
|
+
for (let day = 1; day <= daysInMonth - days.length; day++) {
|
|
71
|
+
week.push(dateUtil.addDays(lastDay, day));
|
|
72
|
+
if (day % 7 === 0) {
|
|
73
|
+
weeks.push(week);
|
|
74
|
+
week = [];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return weeks;
|
|
79
|
+
});
|
|
80
|
+
const daysInMonth = computed(() => {
|
|
81
|
+
const weeks = weeksInMonth.value;
|
|
82
|
+
const today = dateUtil.date();
|
|
83
|
+
return weeks.map((days, weekIndex) => days.map((date, index) => {
|
|
84
|
+
const isoDate = dateUtil.toISO(date);
|
|
85
|
+
const adjacent = !dateUtil.isSameMonth(date, month.value);
|
|
86
|
+
const selected = model.value.some(value => dateUtil.isSameDay(date, value));
|
|
87
|
+
return {
|
|
88
|
+
date,
|
|
89
|
+
isoDate,
|
|
90
|
+
formatted: dateUtil.format(date, 'keyboardDate'),
|
|
91
|
+
year: dateUtil.getYear(date),
|
|
92
|
+
month: dateUtil.getMonth(date),
|
|
93
|
+
day: dateUtil.getDay(date),
|
|
94
|
+
disabled: isDisabled(date),
|
|
95
|
+
weekStart: index % 7 === 0,
|
|
96
|
+
weekEnd: index % 7 === 6,
|
|
97
|
+
rangeStart: selected && model.value.length > 1 && dateUtil.isSameDay(rangeStart.value, date),
|
|
98
|
+
rangeEnd: selected && model.value.length === 2 && dateUtil.isSameDay(rangeEnd.value, date),
|
|
99
|
+
weekIndex,
|
|
100
|
+
selected,
|
|
101
|
+
interval: isInterval(date),
|
|
102
|
+
today: dateUtil.isSameDay(date, today),
|
|
103
|
+
adjacent,
|
|
104
|
+
hidden: adjacent && !props.showAdjacentMonthDates,
|
|
105
|
+
hovered: false,
|
|
106
|
+
localized: dateUtil.format(date, 'dayOfMonth')
|
|
107
|
+
};
|
|
108
|
+
}));
|
|
109
|
+
});
|
|
110
|
+
const weekDays = computed(() => {
|
|
111
|
+
return i18n.locale && dateUtil.getWeekdays();
|
|
112
|
+
});
|
|
113
|
+
const displayYearMonth = computed(() => {
|
|
114
|
+
return dateUtil.format(month.value, 'monthAndYear');
|
|
115
|
+
});
|
|
116
|
+
const rangeStart = computed(() => {
|
|
117
|
+
if (props.range && model.value?.[0]) {
|
|
118
|
+
return model.value[0];
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
const rangeEnd = computed(() => {
|
|
122
|
+
if (props.range && model.value?.[1]) {
|
|
123
|
+
return model.value[1];
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
function isDisabled(value) {
|
|
127
|
+
if (props.disabled) return true;
|
|
128
|
+
const date = dateUtil.date(value);
|
|
129
|
+
if (props.min && dateUtil.isAfter(dateUtil.date(props.min), date)) return true;
|
|
130
|
+
if (props.max && dateUtil.isAfter(date, dateUtil.date(props.max))) return true;
|
|
131
|
+
if (Array.isArray(props.allowedDates) && props.allowedDates.length > 0) {
|
|
132
|
+
return !props.allowedDates.some(d => dateUtil.isSameDay(dateUtil.date(d), date));
|
|
133
|
+
}
|
|
134
|
+
if (typeof props.allowedDates === 'function') {
|
|
135
|
+
return !props.allowedDates(date);
|
|
136
|
+
}
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
function isInterval(value) {
|
|
140
|
+
if (!props.range) return false;
|
|
141
|
+
if (model.value.length === 2) {
|
|
142
|
+
const date = dateUtil.date(value);
|
|
143
|
+
const startDate = dateUtil.date(model.value[0]);
|
|
144
|
+
const endDate = dateUtil.date(model.value[1]);
|
|
145
|
+
if (dateUtil.isAfter(date, startDate) && dateUtil.isBefore(date, endDate)) {
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
function onClickDay(item) {
|
|
152
|
+
const value = item.date;
|
|
153
|
+
if (props.multiple) {
|
|
154
|
+
const index = model.value.findIndex(selection => dateUtil.isSameDay(selection, value));
|
|
155
|
+
if (props.range) {
|
|
156
|
+
if (model.value.length === 1) {
|
|
157
|
+
const firstDate = dateUtil.date(model.value[0]);
|
|
158
|
+
const date = dateUtil.date(value);
|
|
159
|
+
if (dateUtil.isAfter(firstDate, date)) {
|
|
160
|
+
model.value = [date, dateUtil.endOfDay(model.value[0])];
|
|
161
|
+
} else {
|
|
162
|
+
model.value = [dateUtil.startOfDay(model.value[0]), dateUtil.endOfDay(value)];
|
|
163
|
+
}
|
|
164
|
+
} else {
|
|
165
|
+
model.value = [value];
|
|
166
|
+
}
|
|
167
|
+
} else {
|
|
168
|
+
if (index === -1) {
|
|
169
|
+
model.value = [...model.value, value];
|
|
170
|
+
} else {
|
|
171
|
+
const change = [...model.value];
|
|
172
|
+
change.splice(index, 1);
|
|
173
|
+
model.value = change;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
} else {
|
|
177
|
+
model.value = [value];
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
useRender(() => _createVNode("div", {
|
|
181
|
+
"class": ['y-date-calendar', {
|
|
182
|
+
'y-date-calendar--range': props.range && model.value.length === 2
|
|
183
|
+
}]
|
|
184
|
+
}, [!props.hideHeader && _createVNode("header", {
|
|
185
|
+
"class": "y-date-calendar__header"
|
|
186
|
+
}, [slots.header ? slots.header() : displayYearMonth.value]), _createVNode("div", {
|
|
187
|
+
"ref": container$,
|
|
188
|
+
"class": ['y-date-calendar__container']
|
|
189
|
+
}, [!props.hideWeekdays && _createVNode("div", {
|
|
190
|
+
"class": ['y-date-calendar__week']
|
|
191
|
+
}, [weekDays.value.map(weekDay => _createVNode("div", {
|
|
192
|
+
"class": ['y-date-calendar__cell', 'y-date-calendar__weekday']
|
|
193
|
+
}, [weekDay]))]), daysInMonth.value.map((week, i) => {
|
|
194
|
+
return _createVNode("div", {
|
|
195
|
+
"class": ['y-date-calendar__week'],
|
|
196
|
+
"role": "row",
|
|
197
|
+
"aria-rowindex": i
|
|
198
|
+
}, [week.map((item, index) => {
|
|
199
|
+
const slotProps = {
|
|
200
|
+
props: {
|
|
201
|
+
onClick: () => {
|
|
202
|
+
onClickDay(item);
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
item,
|
|
206
|
+
index
|
|
207
|
+
};
|
|
208
|
+
return _createVNode("div", {
|
|
209
|
+
"class": ['y-date-calendar__cell', 'y-date-calendar__day', {
|
|
210
|
+
'y-date-calendar__day--adjacent': item.adjacent,
|
|
211
|
+
'y-date-calendar__day--hovered': item.hovered,
|
|
212
|
+
'y-date-calendar__day--selected': item.selected,
|
|
213
|
+
'y-date-calendar__day--week-start': item.weekStart,
|
|
214
|
+
'y-date-calendar__day--week-end': item.weekEnd,
|
|
215
|
+
'y-date-calendar__day--range-interval': item.interval,
|
|
216
|
+
'y-date-calendar__day--range-start': item.rangeStart,
|
|
217
|
+
'y-date-calendar__day--range-end': item.rangeEnd
|
|
218
|
+
}],
|
|
219
|
+
"data-date": !item.disabled ? item.isoDate : undefined
|
|
220
|
+
}, [(props.showAdjacentMonthDates || !item.adjacent) && _createVNode(_Fragment, null, [slots.day?.(slotProps) ?? _createVNode(YButton, _mergeProps({
|
|
221
|
+
"color": (item.selected || item.today) && !item.disabled ? props.color : undefined,
|
|
222
|
+
"disabled": item.disabled,
|
|
223
|
+
"variation": ['icon', item.selected ? 'filled' : item.today ? 'outlined' : 'text'].join(',')
|
|
224
|
+
}, slotProps.props), {
|
|
225
|
+
default: () => [item.day]
|
|
226
|
+
})])]);
|
|
227
|
+
})]);
|
|
228
|
+
})])]));
|
|
229
|
+
return {
|
|
230
|
+
day$,
|
|
231
|
+
container$,
|
|
232
|
+
dateUtil,
|
|
233
|
+
displayValue,
|
|
234
|
+
month,
|
|
235
|
+
year,
|
|
236
|
+
rangeStart,
|
|
237
|
+
rangeEnd,
|
|
238
|
+
model
|
|
239
|
+
};
|
|
10
240
|
}
|
|
11
241
|
});
|
|
12
242
|
//# sourceMappingURL=YDateCalendar.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YDateCalendar.mjs","names":["defineComponent","useRender","YDateCalendar","name","setup","_createVNode"],"sources":["../../../src/components/date-picker/YDateCalendar.tsx"],"sourcesContent":["import { defineComponent } from 'vue';\n\nimport { useRender } from '../../composables/component';\n\nexport const YDateCalendar = defineComponent({\n name: 'YDateCalendar',\n setup() {\n useRender(() => {\n return <div></div>;\n });\n },\n});\n\nexport type YDateCalendar = InstanceType<typeof YDateCalendar>;\n"],"mappings":";AAAA,SAASA,eAAe,QAAQ,KAAK;AAAC,SAE7BC,SAAS;AAElB,OAAO,MAAMC,aAAa,GAAGF,eAAe,CAAC;EAC3CG,IAAI,EAAE,eAAe;EACrBC,KAAKA,CAAA,EAAG;IACNH,SAAS,CAAC,MAAM;MACd,OAAAI,YAAA;IACF,CAAC,CAAC;EACJ;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"YDateCalendar.mjs","names":["computed","defineComponent","ref","useModelDuplex","useRender","useDate","useI18n","wrapInArray","propsFactory","YButton","pressYDateCalendarPropsOptions","year","Number","String","month","modelValue","Array","multiple","Boolean","range","allowedDates","Function","max","min","disabled","color","hideWeekdays","showAdjacentMonthDates","type","default","hideHeader","YDateCalendar","name","props","emits","date","setup","_ref","slots","dateUtil","i18n","container$","day$","model","v","displayValue","value","length","isArray","undefined","getYear","startOfYear","setYear","getMonth","setMonth","weeksInMonth","weeks","getWeekArray","days","flat","daysInMonth","lastDay","week","day","push","addDays","today","map","weekIndex","index","isoDate","toISO","adjacent","isSameMonth","selected","some","isSameDay","formatted","format","getDay","isDisabled","weekStart","weekEnd","rangeStart","rangeEnd","interval","isInterval","hidden","hovered","localized","weekDays","locale","getWeekdays","displayYearMonth","isAfter","d","startDate","endDate","isBefore","onClickDay","item","findIndex","selection","firstDate","endOfDay","startOfDay","change","splice","_createVNode","header","weekDay","i","slotProps","onClick","_Fragment","_mergeProps","join"],"sources":["../../../src/components/date-picker/YDateCalendar.tsx"],"sourcesContent":["import { computed, defineComponent, ref } from 'vue';\r\nimport type { PropType } from 'vue';\r\n\r\nimport { useModelDuplex } from '../../composables/communication';\r\nimport { useRender } from '../../composables/component';\r\nimport { useDate } from '../../composables/date';\r\nimport { useI18n } from '../../composables/i18n';\r\nimport { wrapInArray } from '../../util';\r\nimport { propsFactory } from '../../util/vue-component';\r\nimport { YButton } from '../button';\r\n\r\nimport './YDateCalendar.scss';\r\n\r\nexport const pressYDateCalendarPropsOptions = propsFactory(\r\n {\r\n year: [Number, String],\r\n month: [Number, String],\r\n modelValue: Array as PropType<unknown[]>,\r\n multiple: Boolean,\r\n range: Boolean,\r\n allowedDates: [Array, Function],\r\n max: null as any as PropType<unknown>,\r\n min: null as any as PropType<unknown>,\r\n disabled: Boolean,\r\n color: String,\r\n hideWeekdays: Boolean,\r\n showAdjacentMonthDates: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n hideHeader: Boolean,\r\n },\r\n 'YDateCalendar',\r\n);\r\n\r\nexport const YDateCalendar = defineComponent({\r\n name: 'YDateCalendar',\r\n props: pressYDateCalendarPropsOptions(),\r\n emits: {\r\n 'update:modelValue': (date: any) => true,\r\n 'update:year': (date: any) => true,\r\n 'update:month': (date: any) => true,\r\n },\r\n setup(props, { slots }) {\r\n const dateUtil = useDate();\r\n const i18n = useI18n();\r\n const container$ = ref();\r\n const day$ = ref([]);\r\n\r\n const model = useModelDuplex(props, 'modelValue', [], (v) =>\r\n wrapInArray(v),\r\n );\r\n\r\n const displayValue = computed(() => {\r\n if (model.value.length > 0) return dateUtil.date(model.value[0]);\r\n if (props.min) return dateUtil.date(props.min);\r\n if (Array.isArray(props.allowedDates)) {\r\n return dateUtil.date(props.allowedDates[0]);\r\n }\r\n\r\n return dateUtil.date();\r\n });\r\n\r\n const year = useModelDuplex(\r\n props,\r\n 'year',\r\n undefined,\r\n (v) => {\r\n const value =\r\n v != null ? Number(v) : dateUtil.getYear(displayValue.value);\r\n\r\n return dateUtil.startOfYear(dateUtil.setYear(dateUtil.date(), value));\r\n },\r\n (v) => dateUtil.getYear(v),\r\n );\r\n\r\n const month = useModelDuplex(\r\n props,\r\n 'month',\r\n undefined,\r\n (v) => {\r\n const value =\r\n v != null ? Number(v) : dateUtil.getMonth(displayValue.value);\r\n const date = dateUtil.setYear(\r\n dateUtil.date(),\r\n dateUtil.getYear(year.value),\r\n );\r\n\r\n return dateUtil.setMonth(date, value);\r\n },\r\n (v) => dateUtil.getMonth(v),\r\n );\r\n\r\n const weeksInMonth = computed(() => {\r\n const weeks = dateUtil.getWeekArray(month.value);\r\n const days = weeks.flat();\r\n\r\n const daysInMonth = 6 * 7;\r\n if (days.length < daysInMonth) {\r\n const lastDay = days[days.length - 1];\r\n\r\n let week = [];\r\n for (let day = 1; day <= daysInMonth - days.length; day++) {\r\n week.push(dateUtil.addDays(lastDay, day));\r\n\r\n if (day % 7 === 0) {\r\n weeks.push(week);\r\n week = [];\r\n }\r\n }\r\n }\r\n\r\n return weeks;\r\n });\r\n\r\n const daysInMonth = computed(() => {\r\n const weeks = weeksInMonth.value;\r\n const today = dateUtil.date();\r\n\r\n return weeks.map((days, weekIndex) =>\r\n days.map((date, index) => {\r\n const isoDate = dateUtil.toISO(date);\r\n const adjacent = !dateUtil.isSameMonth(date, month.value);\r\n const selected = model.value.some((value: unknown) =>\r\n dateUtil.isSameDay(date, value),\r\n );\r\n return {\r\n date,\r\n isoDate,\r\n formatted: dateUtil.format(date, 'keyboardDate'),\r\n year: dateUtil.getYear(date),\r\n month: dateUtil.getMonth(date),\r\n day: dateUtil.getDay(date),\r\n disabled: isDisabled(date),\r\n weekStart: index % 7 === 0,\r\n weekEnd: index % 7 === 6,\r\n rangeStart:\r\n selected &&\r\n model.value.length > 1 &&\r\n dateUtil.isSameDay(rangeStart.value, date),\r\n rangeEnd:\r\n selected &&\r\n model.value.length === 2 &&\r\n dateUtil.isSameDay(rangeEnd.value, date),\r\n weekIndex,\r\n selected,\r\n interval: isInterval(date),\r\n today: dateUtil.isSameDay(date, today),\r\n adjacent,\r\n hidden: adjacent && !props.showAdjacentMonthDates,\r\n hovered: false,\r\n localized: dateUtil.format(date, 'dayOfMonth'),\r\n };\r\n }),\r\n );\r\n });\r\n\r\n const weekDays = computed(() => {\r\n return i18n.locale && dateUtil.getWeekdays();\r\n });\r\n\r\n const displayYearMonth = computed(() => {\r\n return dateUtil.format(month.value, 'monthAndYear');\r\n });\r\n\r\n const rangeStart = computed(() => {\r\n if (props.range && model.value?.[0]) {\r\n return model.value[0];\r\n }\r\n });\r\n\r\n const rangeEnd = computed(() => {\r\n if (props.range && model.value?.[1]) {\r\n return model.value[1];\r\n }\r\n });\r\n\r\n function isDisabled(value: unknown) {\r\n if (props.disabled) return true;\r\n\r\n const date = dateUtil.date(value);\r\n\r\n if (props.min && dateUtil.isAfter(dateUtil.date(props.min), date))\r\n return true;\r\n if (props.max && dateUtil.isAfter(date, dateUtil.date(props.max)))\r\n return true;\r\n\r\n if (Array.isArray(props.allowedDates) && props.allowedDates.length > 0) {\r\n return !props.allowedDates.some((d) =>\r\n dateUtil.isSameDay(dateUtil.date(d), date),\r\n );\r\n }\r\n\r\n if (typeof props.allowedDates === 'function') {\r\n return !props.allowedDates(date);\r\n }\r\n\r\n return false;\r\n }\r\n\r\n function isInterval(value: unknown) {\r\n if (!props.range) return false;\r\n if (model.value.length === 2) {\r\n const date = dateUtil.date(value);\r\n const startDate = dateUtil.date(model.value[0]);\r\n const endDate = dateUtil.date(model.value[1]);\r\n if (\r\n dateUtil.isAfter(date, startDate) &&\r\n dateUtil.isBefore(date, endDate)\r\n ) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n function onClickDay(item: any) {\r\n const value = item.date;\r\n if (props.multiple) {\r\n const index = model.value.findIndex((selection: unknown) =>\r\n dateUtil.isSameDay(selection, value),\r\n );\r\n\r\n if (props.range) {\r\n if (model.value.length === 1) {\r\n const firstDate = dateUtil.date(model.value[0]);\r\n const date = dateUtil.date(value);\r\n if (dateUtil.isAfter(firstDate, date)) {\r\n model.value = [date, dateUtil.endOfDay(model.value[0])];\r\n } else {\r\n model.value = [\r\n dateUtil.startOfDay(model.value[0]),\r\n dateUtil.endOfDay(value),\r\n ];\r\n }\r\n } else {\r\n model.value = [value];\r\n }\r\n } else {\r\n if (index === -1) {\r\n model.value = [...model.value, value];\r\n } else {\r\n const change = [...model.value];\r\n change.splice(index, 1);\r\n model.value = change;\r\n }\r\n }\r\n } else {\r\n model.value = [value];\r\n }\r\n }\r\n\r\n useRender(() => (\r\n <div\r\n class={[\r\n 'y-date-calendar',\r\n { 'y-date-calendar--range': props.range && model.value.length === 2 },\r\n ]}\r\n >\r\n {!props.hideHeader && (\r\n <header class=\"y-date-calendar__header\">\r\n {slots.header ? slots.header() : displayYearMonth.value}\r\n </header>\r\n )}\r\n <div ref={container$} class={['y-date-calendar__container']}>\r\n {!props.hideWeekdays && (\r\n <div class={['y-date-calendar__week']}>\r\n {weekDays.value.map((weekDay) => (\r\n <div\r\n class={['y-date-calendar__cell', 'y-date-calendar__weekday']}\r\n >\r\n {weekDay}\r\n </div>\r\n ))}\r\n </div>\r\n )}\r\n {daysInMonth.value.map((week, i) => {\r\n return (\r\n <div\r\n class={['y-date-calendar__week']}\r\n role=\"row\"\r\n aria-rowindex={i}\r\n >\r\n {week.map((item, index) => {\r\n const slotProps = {\r\n props: {\r\n onClick: () => {\r\n onClickDay(item);\r\n },\r\n },\r\n item,\r\n index,\r\n } as const;\r\n\r\n return (\r\n <div\r\n class={[\r\n 'y-date-calendar__cell',\r\n 'y-date-calendar__day',\r\n {\r\n 'y-date-calendar__day--adjacent': item.adjacent,\r\n 'y-date-calendar__day--hovered': item.hovered,\r\n 'y-date-calendar__day--selected': item.selected,\r\n 'y-date-calendar__day--week-start': item.weekStart,\r\n 'y-date-calendar__day--week-end': item.weekEnd,\r\n 'y-date-calendar__day--range-interval': item.interval,\r\n 'y-date-calendar__day--range-start': item.rangeStart,\r\n 'y-date-calendar__day--range-end': item.rangeEnd,\r\n },\r\n ]}\r\n data-date={!item.disabled ? item.isoDate : undefined}\r\n >\r\n {(props.showAdjacentMonthDates || !item.adjacent) && (\r\n <>\r\n {slots.day?.(slotProps) ?? (\r\n <YButton\r\n color={\r\n (item.selected || item.today) && !item.disabled\r\n ? props.color\r\n : undefined\r\n }\r\n disabled={item.disabled}\r\n variation={[\r\n 'icon',\r\n item.selected\r\n ? 'filled'\r\n : item.today\r\n ? 'outlined'\r\n : 'text',\r\n ].join(',')}\r\n {...slotProps.props}\r\n >\r\n {item.day}\r\n </YButton>\r\n )}\r\n </>\r\n )}\r\n </div>\r\n );\r\n })}\r\n </div>\r\n );\r\n })}\r\n </div>\r\n </div>\r\n ));\r\n\r\n return {\r\n day$,\r\n container$,\r\n dateUtil,\r\n displayValue,\r\n month,\r\n year,\r\n rangeStart,\r\n rangeEnd,\r\n model,\r\n };\r\n },\r\n});\r\n\r\nexport type YDateCalendar = InstanceType<typeof YDateCalendar>;\r\n"],"mappings":";AAAA,SAASA,QAAQ,EAAEC,eAAe,EAAEC,GAAG,QAAQ,KAAK;AAAC,SAG5CC,cAAc;AAAA,SACdC,SAAS;AAAA,SACTC,OAAO;AAAA,SACPC,OAAO;AAAA,SACPC,WAAW;AAAA,SACXC,YAAY;AAAA,SACZC,OAAO;AAEhB;AAEA,OAAO,MAAMC,8BAA8B,GAAGF,YAAY,CACxD;EACEG,IAAI,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;EACtBC,KAAK,EAAE,CAACF,MAAM,EAAEC,MAAM,CAAC;EACvBE,UAAU,EAAEC,KAA4B;EACxCC,QAAQ,EAAEC,OAAO;EACjBC,KAAK,EAAED,OAAO;EACdE,YAAY,EAAE,CAACJ,KAAK,EAAEK,QAAQ,CAAC;EAC/BC,GAAG,EAAE,IAAgC;EACrCC,GAAG,EAAE,IAAgC;EACrCC,QAAQ,EAAEN,OAAO;EACjBO,KAAK,EAAEZ,MAAM;EACba,YAAY,EAAER,OAAO;EACrBS,sBAAsB,EAAE;IACtBC,IAAI,EAAEV,OAAO;IACbW,OAAO,EAAE;EACX,CAAC;EACDC,UAAU,EAAEZ;AACd,CAA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A,SAE3C5E,KAAK,CAACyB,GAAG,GAAGiD,SAAS,CAAC,IAAAJ,YAAA,CAAAnG,OAAA,EAAA0G,WAAA;UAAA,SAGjB,CAACf,IAAI,CAAC1B,QAAQ,IAAI0B,IAAI,CAAClC,KAAK,KAAK,CAACkC,IAAI,CAAC5E,QAAQ,GAC3CS,KAAK,CAACR,KAAK,GACXwB,SAAS;UAAA,YAELmD,IAAI,CAAC5E,QAAQ;UAAA,aACZ,CACT,MAAM,EACN4E,IAAI,CAAC1B,QAAQ,GACT,QAAQ,GACR0B,IAAI,CAAClC,KAAK,GACV,UAAU,GACV,MAAM,CACX,CAACkD,IAAI,CAAC,GAAG;QAAC,GACPJ,SAAS,CAAC/E,KAAK;UAAAJ,OAAA,EAAAA,CAAA,MAElBuE,IAAI,CAACrC,GAAG;QAAA,EAEZ,EAEJ;MAGP,CAAC,CAAC;IAGR,CAAC,CAAC,IAGP,CAAC;IAEF,OAAO;MACLrB,IAAI;MACJD,UAAU;MACVF,QAAQ;MACRM,YAAY;MACZ/B,KAAK;MACLH,IAAI;MACJwE,UAAU;MACVC,QAAQ;MACRzC;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
@use '../../styles/util/mixin';
|
|
2
|
+
|
|
3
|
+
.y-date-calendar {
|
|
4
|
+
padding: 0 8px;
|
|
5
|
+
|
|
6
|
+
&__header {
|
|
7
|
+
display: flex;
|
|
8
|
+
padding: 0 12px 12px;
|
|
9
|
+
font-weight: 500;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&__week {
|
|
13
|
+
display: grid;
|
|
14
|
+
grid-template-columns: repeat(7, min-content);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__cell {
|
|
18
|
+
width: 40px;
|
|
19
|
+
height: 40px;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
align-items: center;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&__weekday {
|
|
27
|
+
font-size: 0.875rem;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&__day {
|
|
32
|
+
position: relative;
|
|
33
|
+
|
|
34
|
+
.y-button {
|
|
35
|
+
width: 36px;
|
|
36
|
+
height: 36px;
|
|
37
|
+
--y-button__disabled-background: transparent;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&--adjacent {
|
|
41
|
+
color: var(--y-theme-on-surface-variant);
|
|
42
|
+
opacity: 0.5;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:before {
|
|
46
|
+
content: '';
|
|
47
|
+
position: absolute;
|
|
48
|
+
right: 0;
|
|
49
|
+
left: 0;
|
|
50
|
+
top: calc((40px - 36px) / 2);
|
|
51
|
+
bottom: calc((40px - 36px) / 2);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&--range-interval:before {
|
|
55
|
+
background: rgba(var(--y-theme-primary-rgb), 0.3);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&--range-start:before,
|
|
59
|
+
&--range-end:before {
|
|
60
|
+
background: rgba(var(--y-theme-primary-rgb), 0.3);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&--range-start:before, &--week-start:before {
|
|
64
|
+
left: calc((40px - 36px) / 2);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&--range-end:before, &--week-end:before {
|
|
68
|
+
right: calc((40px - 36px) / 2);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&--range-interval#{&}--week-start:before,
|
|
72
|
+
&--range-start:before {
|
|
73
|
+
@include mixin.borderRadius(50%, 'left');
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&--range-interval#{&}--week-end:before,
|
|
77
|
+
&--range-start#{&}--week-end:before,
|
|
78
|
+
&--range-end:before {
|
|
79
|
+
@include mixin.borderRadius(50%, 'right');
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YDatePicker.mjs","names":["defineComponent","useRender","YDatePicker","name","setup","_createVNode"],"sources":["../../../src/components/date-picker/YDatePicker.tsx"],"sourcesContent":["import { defineComponent } from 'vue';\n\nimport { useRender } from '../../composables/component';\n\nexport const YDatePicker = defineComponent({\n name: 'YDatePicker',\n setup() {\n useRender(() => <div class={['y-date-picker']}></div>);\n },\n});\n\nexport type YDatePicker = InstanceType<typeof YDatePicker>;\n"],"mappings":";AAAA,SAASA,eAAe,QAAQ,KAAK;AAAC,SAE7BC,SAAS;AAElB,OAAO,MAAMC,WAAW,GAAGF,eAAe,CAAC;EACzCG,IAAI,EAAE,aAAa;EACnBC,KAAKA,CAAA,EAAG;IACNH,SAAS,CAAC,MAAAI,YAAA;MAAA,SAAkB,CAAC,eAAe;IAAC,QAAQ,CAAC;EACxD;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"YDatePicker.mjs","names":["defineComponent","useRender","YDatePicker","name","setup","_createVNode"],"sources":["../../../src/components/date-picker/YDatePicker.tsx"],"sourcesContent":["import { defineComponent } from 'vue';\r\n\r\nimport { useRender } from '../../composables/component';\r\n\r\nexport const YDatePicker = defineComponent({\r\n name: 'YDatePicker',\r\n setup() {\r\n useRender(() => <div class={['y-date-picker']}></div>);\r\n },\r\n});\r\n\r\nexport type YDatePicker = InstanceType<typeof YDatePicker>;\r\n"],"mappings":";AAAA,SAASA,eAAe,QAAQ,KAAK;AAAC,SAE7BC,SAAS;AAElB,OAAO,MAAMC,WAAW,GAAGF,eAAe,CAAC;EACzCG,IAAI,EAAE,aAAa;EACnBC,KAAKA,CAAA,EAAG;IACNH,SAAS,CAAC,MAAAI,YAAA;MAAA,SAAkB,CAAC,eAAe;IAAC,QAAQ,CAAC;EACxD;AACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createVNode as _createVNode } from "vue";
|
|
2
|
+
import { defineComponent } from 'vue';
|
|
3
|
+
import { useRender } from "../../composables/component.mjs";
|
|
4
|
+
import { propsFactory } from "../../util/vue-component.mjs";
|
|
5
|
+
import "./YDatePickerControl.scss";
|
|
6
|
+
export const pressYDatePickerControlPropsOptions = propsFactory({
|
|
7
|
+
disabled: {
|
|
8
|
+
type: [Boolean, String, Array],
|
|
9
|
+
default: false
|
|
10
|
+
},
|
|
11
|
+
nextIcon: {
|
|
12
|
+
type: [String, Object]
|
|
13
|
+
},
|
|
14
|
+
prevIcon: {
|
|
15
|
+
type: [String, Object]
|
|
16
|
+
},
|
|
17
|
+
dropdownIcon: {
|
|
18
|
+
type: [String, Object]
|
|
19
|
+
}
|
|
20
|
+
}, 'YDataPickerControl');
|
|
21
|
+
export const YDatePickerControl = defineComponent({
|
|
22
|
+
name: 'YDatePickerControl',
|
|
23
|
+
setup() {
|
|
24
|
+
useRender(() => _createVNode("div", {
|
|
25
|
+
"class": ['y-date-picker-control']
|
|
26
|
+
}, null));
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=YDatePickerControl.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"YDatePickerControl.mjs","names":["defineComponent","useRender","propsFactory","pressYDatePickerControlPropsOptions","disabled","type","Boolean","String","Array","default","nextIcon","Object","prevIcon","dropdownIcon","YDatePickerControl","name","setup","_createVNode"],"sources":["../../../src/components/date-picker/YDatePickerControl.tsx"],"sourcesContent":["import { defineComponent } from 'vue';\nimport type { PropType } from 'vue';\n\nimport { useRender } from '../../composables/component';\nimport { propsFactory } from '../../util/vue-component';\n\nimport './YDatePickerControl.scss';\n\nexport const pressYDatePickerControlPropsOptions = propsFactory(\n {\n disabled: {\n type: [Boolean, String, Array] as PropType<boolean | string | string[]>,\n default: false,\n },\n nextIcon: {\n type: [String, Object],\n },\n prevIcon: {\n type: [String, Object],\n },\n dropdownIcon: {\n type: [String, Object],\n },\n },\n 'YDataPickerControl',\n);\n\nexport const YDatePickerControl = defineComponent({\n name: 'YDatePickerControl',\n setup() {\n useRender(() => <div class={['y-date-picker-control']}></div>);\n },\n});\n\nexport type YDatePickerControl = InstanceType<typeof YDatePickerControl>;\n"],"mappings":";AAAA,SAASA,eAAe,QAAQ,KAAK;AAAC,SAG7BC,SAAS;AAAA,SACTC,YAAY;AAErB;AAEA,OAAO,MAAMC,mCAAmC,GAAGD,YAAY,CAC7D;EACEE,QAAQ,EAAE;IACRC,IAAI,EAAE,CAACC,OAAO,EAAEC,MAAM,EAAEC,KAAK,CAA0C;IACvEC,OAAO,EAAE;EACX,CAAC;EACDC,QAAQ,EAAE;IACRL,IAAI,EAAE,CAACE,MAAM,EAAEI,MAAM;EACvB,CAAC;EACDC,QAAQ,EAAE;IACRP,IAAI,EAAE,CAACE,MAAM,EAAEI,MAAM;EACvB,CAAC;EACDE,YAAY,EAAE;IACZR,IAAI,EAAE,CAACE,MAAM,EAAEI,MAAM;EACvB;AACF,CAAC,EACD,oBACF,CAAC;AAED,OAAO,MAAMG,kBAAkB,GAAGd,eAAe,CAAC;EAChDe,IAAI,EAAE,oBAAoB;EAC1BC,KAAKA,CAAA,EAAG;IACNf,SAAS,CAAC,MAAAgB,YAAA;MAAA,SAAkB,CAAC,uBAAuB;IAAC,QAAQ,CAAC;EAChE;AACF,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export * from "./YDateCalendar.mjs";
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/components/date-picker/index.ts"],"sourcesContent":[""],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/components/date-picker/index.ts"],"sourcesContent":["export * from './YDateCalendar';\r\n"],"mappings":""}
|
|
@@ -7,10 +7,12 @@ export const pressYDividerPropsOptions = propsFactory({
|
|
|
7
7
|
}, 'YDivider');
|
|
8
8
|
export const YDivider = defineComponent({
|
|
9
9
|
props: pressYDividerPropsOptions(),
|
|
10
|
-
setup() {
|
|
10
|
+
setup(props) {
|
|
11
11
|
useRender(() => {
|
|
12
12
|
return _withDirectives(_createVNode("hr", {
|
|
13
|
-
"class": ['y-divider'
|
|
13
|
+
"class": ['y-divider', {
|
|
14
|
+
'y-divider--vertical': props.vertical
|
|
15
|
+
}]
|
|
14
16
|
}, null), [[_resolveDirective("theme")]]);
|
|
15
17
|
});
|
|
16
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"YDivider.mjs","names":["defineComponent","useRender","propsFactory","pressYDividerPropsOptions","vertical","Boolean","YDivider","props","setup","_withDirectives","_createVNode","_resolveDirective"],"sources":["../../../src/components/divider/YDivider.tsx"],"sourcesContent":["import { defineComponent } from 'vue';\
|
|
1
|
+
{"version":3,"file":"YDivider.mjs","names":["defineComponent","useRender","propsFactory","pressYDividerPropsOptions","vertical","Boolean","YDivider","props","setup","_withDirectives","_createVNode","_resolveDirective"],"sources":["../../../src/components/divider/YDivider.tsx"],"sourcesContent":["import { defineComponent } from 'vue';\nimport type { PropType } from 'vue';\n\nimport { useRender } from '../../composables/component';\nimport { propsFactory } from '../../util';\n\nexport const pressYDividerPropsOptions = propsFactory(\n {\n vertical: Boolean as PropType<boolean>,\n },\n 'YDivider',\n);\n\nexport const YDivider = defineComponent({\n props: pressYDividerPropsOptions(),\n setup(props) {\n useRender(() => {\n return (\n <hr\n class={['y-divider', { 'y-divider--vertical': props.vertical }]}\n v-theme\n />\n );\n });\n },\n});\n\nexport type YDivider = InstanceType<typeof YDivider>;\n"],"mappings":";AAAA,SAASA,eAAe,QAAQ,KAAK;AAAC,SAG7BC,SAAS;AAAA,SACTC,YAAY;AAErB,OAAO,MAAMC,yBAAyB,GAAGD,YAAY,CACnD;EACEE,QAAQ,EAAEC;AACZ,CAAC,EACD,UACF,CAAC;AAED,OAAO,MAAMC,QAAQ,GAAGN,eAAe,CAAC;EACtCO,KAAK,EAAEJ,yBAAyB,CAAC,CAAC;EAClCK,KAAKA,CAACD,KAAK,EAAE;IACXN,SAAS,CAAC,MAAM;MACd,OAAAQ,eAAA,CAAAC,YAAA;QAAA,SAEW,CAAC,WAAW,EAAE;UAAE,qBAAqB,EAAEH,KAAK,CAACH;QAAS,CAAC;MAAC,YAAAO,iBAAA;IAIrE,CAAC,CAAC;EACJ;AACF,CAAC,CAAC"}
|
package/lib/components/index.mjs
CHANGED
|
@@ -26,4 +26,6 @@ export * from "./select/index.mjs";
|
|
|
26
26
|
export * from "./tab/index.mjs";
|
|
27
27
|
export * from "./alert/index.mjs";
|
|
28
28
|
export * from "./divider/index.mjs";
|
|
29
|
+
export * from "./date-picker/index.mjs";
|
|
30
|
+
export * from "./date-picker/index.mjs";
|
|
29
31
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/components/index.ts"],"sourcesContent":["export * from './app';\r\nexport * from './button';\r\nexport * from './input';\r\nexport * from './field-input';\r\nexport * from './form';\r\nexport * from './progress-bar';\r\nexport * from './card';\r\nexport * from './chip';\r\nexport * from './switch';\r\nexport * from './layer';\r\nexport * from './dialog';\r\nexport * from './snackbar';\r\nexport * from './tooltip';\r\nexport * from './transitions';\r\nexport * from './panel';\r\nexport * from './tree-view';\r\nexport * from './list';\r\nexport * from './icons';\r\nexport * from './table';\r\nexport * from './menu';\r\nexport * from './checkbox';\r\nexport * from './pagination';\r\nexport * from './loading';\r\nexport * from './dropdown';\r\nexport * from './select';\r\nexport * from './tab';\r\nexport * from './alert';\r\nexport * from './divider';\r\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/components/index.ts"],"sourcesContent":["export * from './app';\r\nexport * from './button';\r\nexport * from './input';\r\nexport * from './field-input';\r\nexport * from './form';\r\nexport * from './progress-bar';\r\nexport * from './card';\r\nexport * from './chip';\r\nexport * from './switch';\r\nexport * from './layer';\r\nexport * from './dialog';\r\nexport * from './snackbar';\r\nexport * from './tooltip';\r\nexport * from './transitions';\r\nexport * from './panel';\r\nexport * from './tree-view';\r\nexport * from './list';\r\nexport * from './icons';\r\nexport * from './table';\r\nexport * from './menu';\r\nexport * from './checkbox';\r\nexport * from './pagination';\r\nexport * from './loading';\r\nexport * from './dropdown';\r\nexport * from './select';\r\nexport * from './tab';\r\nexport * from './alert';\r\nexport * from './divider';\r\nexport * from './date-picker';\r\nexport * from './date-picker';\r\n"],"mappings":""}
|
|
@@ -239,7 +239,7 @@ export const YInput = defineComponent({
|
|
|
239
239
|
});
|
|
240
240
|
const children = [];
|
|
241
241
|
if (helperTextSlot) {
|
|
242
|
-
children.push(h('span', {}, helperTextSlot));
|
|
242
|
+
children.push(h('span', {}, () => helperTextSlot));
|
|
243
243
|
} else {
|
|
244
244
|
children.push(this.errorResult);
|
|
245
245
|
}
|