vueless 0.0.424 → 0.0.425
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/directives/vTooltip.js +15 -1
- package/package.json +1 -1
- package/preset.tailwind.js +40 -0
- package/ui.data-table/UTableRow.vue +33 -2
- package/ui.data-table/storybook/stories.js +38 -18
- package/ui.data-table/utilTable.js +7 -3
- package/ui.form-calendar/config.js +3 -3
- package/ui.form-date-picker-range/UDatePickerRangePeriodMenu.vue +21 -94
- package/ui.form-date-picker-range/config.js +3 -7
- package/ui.form-date-picker-range/useAttrs.js +9 -26
- package/web-types.json +1 -1
package/directives/vTooltip.js
CHANGED
|
@@ -25,12 +25,26 @@ export default {
|
|
|
25
25
|
mounted(el, bindings) {
|
|
26
26
|
if (isSSR) return;
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
if (typeof bindings.value === "string" && bindings.value.length) {
|
|
29
|
+
tippy(el, merge(settings, { content: bindings.value }));
|
|
30
|
+
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (bindings.value.content && bindings.value.content.length) {
|
|
35
|
+
tippy(el, merge(settings, bindings.value || {}));
|
|
36
|
+
}
|
|
29
37
|
},
|
|
30
38
|
|
|
31
39
|
updated(el, bindings) {
|
|
32
40
|
if (!el._tippy || isSSR) return;
|
|
33
41
|
|
|
42
|
+
if (typeof bindings.value === "string") {
|
|
43
|
+
el._tippy.setProps(merge(settings, { content: bindings.value }));
|
|
44
|
+
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
34
48
|
el._tippy.setProps(merge(settings, bindings.value || {}));
|
|
35
49
|
},
|
|
36
50
|
|
package/package.json
CHANGED
package/preset.tailwind.js
CHANGED
|
@@ -6,6 +6,10 @@ import {
|
|
|
6
6
|
GRAY_COLOR,
|
|
7
7
|
COOL_COLOR,
|
|
8
8
|
DARK_MODE_SELECTOR,
|
|
9
|
+
DEFAULT_ROUNDING,
|
|
10
|
+
DEFAULT_RING,
|
|
11
|
+
DEFAULT_RING_OFFSET,
|
|
12
|
+
DEFAULT_GRAY_COLOR,
|
|
9
13
|
} from "./constants.js";
|
|
10
14
|
|
|
11
15
|
const isStrategyOverride = process.env.VUELESS_STRATEGY === "override";
|
|
@@ -82,6 +86,16 @@ export const vuelessTailwindConfig = {
|
|
|
82
86
|
dynamic: "var(--vl-rounding)",
|
|
83
87
|
},
|
|
84
88
|
},
|
|
89
|
+
configViewer: {
|
|
90
|
+
themeReplacements: {
|
|
91
|
+
// TODO: Set colors from vueless.config.{js|ts} if it present.
|
|
92
|
+
"var(--vl-ring)": DEFAULT_RING,
|
|
93
|
+
"var(--vl-ring-offset)": DEFAULT_RING_OFFSET,
|
|
94
|
+
"var(--vl-rounding)": DEFAULT_ROUNDING,
|
|
95
|
+
...getReplacementColors(GRAY_COLOR, DEFAULT_GRAY_COLOR),
|
|
96
|
+
...getReplacementColors(BRAND_COLOR, DEFAULT_GRAY_COLOR),
|
|
97
|
+
},
|
|
98
|
+
},
|
|
85
99
|
},
|
|
86
100
|
};
|
|
87
101
|
|
|
@@ -133,3 +147,29 @@ function getPalette(color) {
|
|
|
133
147
|
|
|
134
148
|
return palette;
|
|
135
149
|
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Prepare a color object for theme replacement to fix missing css color variables in `tailwind-config-viewer`.
|
|
153
|
+
* @param { String } color (gray | brand)
|
|
154
|
+
* @param { String } tailwindColor any tailwind color with pallet.
|
|
155
|
+
* @returns { Object } - `tailwind-config-viewer` color replacement object.
|
|
156
|
+
*/
|
|
157
|
+
function getReplacementColors(color, tailwindColor) {
|
|
158
|
+
const customColors = {
|
|
159
|
+
...colors,
|
|
160
|
+
[BRAND_COLOR]: brandColors || {},
|
|
161
|
+
[GRAY_COLOR]: grayColors || {},
|
|
162
|
+
[COOL_COLOR]: { ...(colors[GRAY_COLOR] || {}) },
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
let varsPalette = {
|
|
166
|
+
[twColorWithOpacity(`--vl-color-${color}-default`)]: customColors[tailwindColor][600],
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
COLOR_SHADES.forEach((shade) => {
|
|
170
|
+
varsPalette[twColorWithOpacity(`--vl-color-${color}-${shade}`)] =
|
|
171
|
+
customColors[tailwindColor][shade];
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
return varsPalette;
|
|
175
|
+
}
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
:name="getToggleIconName(row)"
|
|
37
37
|
color="brand"
|
|
38
38
|
v-bind="toggleIconConfig"
|
|
39
|
-
@click="
|
|
39
|
+
@click="onClickToggleIcon"
|
|
40
40
|
/>
|
|
41
41
|
</div>
|
|
42
42
|
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
</template>
|
|
89
89
|
|
|
90
90
|
<UTableRow
|
|
91
|
-
v-if="row.row && !row.row.isHidden && !row.nestedData"
|
|
91
|
+
v-if="isSingleNestedRow && row.row && !row.row.isHidden && !row.nestedData"
|
|
92
92
|
v-bind="$attrs"
|
|
93
93
|
v-model:selected-rows="selectedRows"
|
|
94
94
|
:attrs="attrs"
|
|
@@ -101,6 +101,25 @@
|
|
|
101
101
|
@toggle-row-visibility="onClickToggleRowChild"
|
|
102
102
|
@click="onClick"
|
|
103
103
|
/>
|
|
104
|
+
|
|
105
|
+
<template v-if="!isSingleNestedRow && row.row.length && !row.nestedData">
|
|
106
|
+
<template v-for="nestedRow in row.row" :key="nestedRow.id">
|
|
107
|
+
<UTableRow
|
|
108
|
+
v-if="!nestedRow.isHidden"
|
|
109
|
+
v-bind="$attrs"
|
|
110
|
+
v-model:selected-rows="selectedRows"
|
|
111
|
+
:attrs="attrs"
|
|
112
|
+
:columns="columns"
|
|
113
|
+
:row="nestedRow"
|
|
114
|
+
:data-test="dataTest"
|
|
115
|
+
:nested-level="nestedLevel + 1"
|
|
116
|
+
:config="config"
|
|
117
|
+
:selectable="selectable"
|
|
118
|
+
@toggle-row-visibility="onClickToggleRowChild"
|
|
119
|
+
@click="onClick"
|
|
120
|
+
/>
|
|
121
|
+
</template>
|
|
122
|
+
</template>
|
|
104
123
|
</template>
|
|
105
124
|
|
|
106
125
|
<script setup>
|
|
@@ -187,6 +206,8 @@ const toggleIconConfig = computed(() =>
|
|
|
187
206
|
|
|
188
207
|
const shift = computed(() => (props.row.row ? 1.5 : 2));
|
|
189
208
|
|
|
209
|
+
const isSingleNestedRow = computed(() => !Array.isArray(props.row.row));
|
|
210
|
+
|
|
190
211
|
const getToggleIconName = computed(() => (row) => {
|
|
191
212
|
const isHidden = row.row?.isHidden || row.nestedData?.isHidden;
|
|
192
213
|
|
|
@@ -268,4 +289,14 @@ function setElementTitle(element) {
|
|
|
268
289
|
element.removeAttribute("title");
|
|
269
290
|
}
|
|
270
291
|
}
|
|
292
|
+
|
|
293
|
+
function onClickToggleIcon() {
|
|
294
|
+
if (isSingleNestedRow.value) {
|
|
295
|
+
onClickToggleRowChild(props.row.row.id);
|
|
296
|
+
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
props.row.row.forEach(({ id }) => onClickToggleRowChild(id));
|
|
301
|
+
}
|
|
271
302
|
</script>
|
|
@@ -67,33 +67,53 @@ function getNestedRow() {
|
|
|
67
67
|
key_2: "Some data",
|
|
68
68
|
key_3: "Numbers",
|
|
69
69
|
key_4: "Statistics",
|
|
70
|
-
row:
|
|
71
|
-
|
|
72
|
-
isChecked: false,
|
|
73
|
-
isHidden: true,
|
|
74
|
-
key_1: "Nesting",
|
|
75
|
-
key_2: "Nesting",
|
|
76
|
-
key_3: "Nesting",
|
|
77
|
-
key_4: "Nesting",
|
|
78
|
-
row: {
|
|
70
|
+
row: [
|
|
71
|
+
{
|
|
79
72
|
id: getRandomId(),
|
|
80
73
|
isChecked: false,
|
|
81
74
|
isHidden: true,
|
|
82
|
-
key_1: "
|
|
83
|
-
key_2: "
|
|
84
|
-
key_3: "
|
|
85
|
-
key_4: "
|
|
75
|
+
key_1: "Nesting",
|
|
76
|
+
key_2: "Nesting",
|
|
77
|
+
key_3: "Nesting",
|
|
78
|
+
key_4: "Nesting",
|
|
86
79
|
row: {
|
|
87
80
|
id: getRandomId(),
|
|
88
81
|
isChecked: false,
|
|
89
82
|
isHidden: true,
|
|
90
|
-
key_1: "
|
|
91
|
-
key_2: "
|
|
92
|
-
key_3: "
|
|
93
|
-
key_4: "
|
|
83
|
+
key_1: "Second level nesting",
|
|
84
|
+
key_2: "Second level nesting",
|
|
85
|
+
key_3: "Second level nesting",
|
|
86
|
+
key_4: "Second level nesting",
|
|
94
87
|
},
|
|
95
88
|
},
|
|
96
|
-
|
|
89
|
+
{
|
|
90
|
+
id: getRandomId(),
|
|
91
|
+
isChecked: false,
|
|
92
|
+
isHidden: true,
|
|
93
|
+
key_1: "Nesting",
|
|
94
|
+
key_2: "Nesting",
|
|
95
|
+
key_3: "Nesting",
|
|
96
|
+
key_4: "Nesting",
|
|
97
|
+
row: {
|
|
98
|
+
id: getRandomId(),
|
|
99
|
+
isChecked: false,
|
|
100
|
+
isHidden: true,
|
|
101
|
+
key_1: "Second level nesting",
|
|
102
|
+
key_2: "Second level nesting",
|
|
103
|
+
key_3: "Second level nesting",
|
|
104
|
+
key_4: "Second level nesting",
|
|
105
|
+
row: {
|
|
106
|
+
id: getRandomId(),
|
|
107
|
+
isChecked: false,
|
|
108
|
+
isHidden: true,
|
|
109
|
+
key_1: "Third level nesting",
|
|
110
|
+
key_2: "Third level nesting",
|
|
111
|
+
key_3: "Third level nesting",
|
|
112
|
+
key_4: "Third level nesting",
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
],
|
|
97
117
|
};
|
|
98
118
|
}
|
|
99
119
|
|
|
@@ -24,19 +24,23 @@ export function syncRowCheck(row, selectedRows) {
|
|
|
24
24
|
|
|
25
25
|
export function toggleRowVisibility(row, targetRowId) {
|
|
26
26
|
if (row.id === targetRowId) {
|
|
27
|
-
if ("isHidden"
|
|
27
|
+
if (Object.hasOwn(row, "isHidden")) {
|
|
28
28
|
row.isHidden = !row.isHidden;
|
|
29
|
-
} else if (row.nestedData && "isHidden"
|
|
29
|
+
} else if (row.nestedData && Object.hasOwn(row.nestedData, "isHidden")) {
|
|
30
30
|
row.nestedData.isHidden = !row.nestedData.isHidden;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
if (row.row) {
|
|
36
|
+
if (row.row && !Array.isArray(row.row)) {
|
|
37
37
|
toggleRowVisibility(row.row, targetRowId);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
if (row.row && Array.isArray(row.row)) {
|
|
41
|
+
row.row.forEach((nestedRow) => toggleRowVisibility(nestedRow, targetRowId));
|
|
42
|
+
}
|
|
43
|
+
|
|
40
44
|
if (row.nestedData) {
|
|
41
45
|
toggleRowVisibility(row.nestedData, targetRowId);
|
|
42
46
|
}
|
|
@@ -7,14 +7,14 @@ export default /*tw*/ {
|
|
|
7
7
|
weekDays: "grid grid-cols-7 justify-items-center gap-1",
|
|
8
8
|
weekDay: "flex size-8 items-center justify-center text-xs uppercase text-gray-500",
|
|
9
9
|
days: "grid grid-cols-7 justify-items-center gap-1",
|
|
10
|
-
dateInRange: "bg-brand/15 !text-brand-900 hover:bg-brand/30 rounded-none",
|
|
10
|
+
dateInRange: "bg-brand/15 font-semibold !text-brand-900 hover:bg-brand/30 rounded-none",
|
|
11
11
|
edgeDateInRange: "",
|
|
12
12
|
firstDateInRange: "rounded-r-none",
|
|
13
13
|
lastDateInRange: "rounded-l-none",
|
|
14
14
|
anotherMonthDate: "text-gray-400",
|
|
15
15
|
activeDate: "bg-brand-100",
|
|
16
|
-
selectedDate: "",
|
|
17
|
-
currentDate: "border-2 border-brand-600",
|
|
16
|
+
selectedDate: "font-semibold",
|
|
17
|
+
currentDate: "border-2 border-brand-600 font-semibold",
|
|
18
18
|
day: "{UButton} size-9 w-full font-normal",
|
|
19
19
|
currentDay: "",
|
|
20
20
|
dayInRange: "",
|
|
@@ -127,82 +127,43 @@
|
|
|
127
127
|
</div>
|
|
128
128
|
|
|
129
129
|
<div v-if="isDatePeriodOutOfRange" v-bind="periodDateListAttrs">
|
|
130
|
-
<template v-for="
|
|
130
|
+
<template v-for="date in periodDateList" :key="date.title">
|
|
131
131
|
<UButton
|
|
132
|
-
v-if="getDatePeriodState(date
|
|
133
|
-
no-ring
|
|
132
|
+
v-if="getDatePeriodState(date).isSelected && getDatePeriodState(date).isCurrentDate"
|
|
134
133
|
size="sm"
|
|
135
|
-
color="grayscale"
|
|
136
134
|
variant="thirdary"
|
|
137
|
-
|
|
138
|
-
v-bind="periodDateActiveAttrs"
|
|
139
|
-
:label="String(date.title)"
|
|
140
|
-
:class="{ 'rounded-dynamic': getDatePeriodState(date, index).isSingleItem }"
|
|
141
|
-
@click="selectDate(date), toggleMenu()"
|
|
142
|
-
/>
|
|
143
|
-
|
|
144
|
-
<UButton
|
|
145
|
-
v-else-if="getDatePeriodState(date, index).isFirstInRange && !isListType"
|
|
135
|
+
color="brand"
|
|
146
136
|
no-ring
|
|
147
|
-
|
|
148
|
-
color="grayscale"
|
|
149
|
-
variant="thirdary"
|
|
137
|
+
filled
|
|
150
138
|
:disabled="isDatePeriodOutOfRange(date)"
|
|
151
|
-
v-bind="
|
|
139
|
+
v-bind="periodDateCurrentSelectedAttrs"
|
|
152
140
|
:label="String(date.title)"
|
|
153
|
-
:class="{ 'rounded-dynamic': getDatePeriodState(date, index).isSingleItem }"
|
|
154
141
|
@click="selectDate(date), toggleMenu()"
|
|
155
142
|
/>
|
|
156
143
|
|
|
157
144
|
<UButton
|
|
158
|
-
v-else-if="getDatePeriodState(date
|
|
159
|
-
no-ring
|
|
145
|
+
v-else-if="getDatePeriodState(date).isSelected"
|
|
160
146
|
size="sm"
|
|
161
|
-
color="grayscale"
|
|
162
147
|
variant="thirdary"
|
|
163
|
-
|
|
164
|
-
v-bind="firstPeriodListDateAttrs"
|
|
165
|
-
:label="String(date.title)"
|
|
166
|
-
:class="{ 'rounded-dynamic': getDatePeriodState(date, index).isSingleItem }"
|
|
167
|
-
@click="selectDate(date), toggleMenu()"
|
|
168
|
-
/>
|
|
169
|
-
|
|
170
|
-
<UButton
|
|
171
|
-
v-else-if="getDatePeriodState(date, index).isLastInRange && !isListType"
|
|
148
|
+
color="brand"
|
|
172
149
|
no-ring
|
|
173
|
-
|
|
174
|
-
color="grayscale"
|
|
175
|
-
variant="thirdary"
|
|
150
|
+
filled
|
|
176
151
|
:disabled="isDatePeriodOutOfRange(date)"
|
|
177
|
-
v-bind="
|
|
152
|
+
v-bind="periodDateSelectedAttrs"
|
|
178
153
|
:label="String(date.title)"
|
|
179
|
-
:class="{ 'rounded-dynamic': getDatePeriodState(date, index).isSingleItem }"
|
|
180
154
|
@click="selectDate(date), toggleMenu()"
|
|
181
155
|
/>
|
|
182
156
|
|
|
183
157
|
<UButton
|
|
184
|
-
v-else-if="getDatePeriodState(date
|
|
185
|
-
no-ring
|
|
158
|
+
v-else-if="getDatePeriodState(date).isCurrentDate"
|
|
186
159
|
size="sm"
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
:disabled="isDatePeriodOutOfRange(date)"
|
|
190
|
-
v-bind="lastPeriodListDateAttrs"
|
|
191
|
-
:label="String(date.title)"
|
|
192
|
-
:class="{ 'rounded-dynamic': getDatePeriodState(date, index).isSingleItem }"
|
|
193
|
-
@click="selectDate(date), toggleMenu()"
|
|
194
|
-
/>
|
|
195
|
-
|
|
196
|
-
<UButton
|
|
197
|
-
v-else-if="getDatePeriodState(date, index).isInRange"
|
|
160
|
+
variant="secondary"
|
|
161
|
+
color="brand"
|
|
198
162
|
no-ring
|
|
199
|
-
|
|
200
|
-
color="grayscale"
|
|
201
|
-
variant="thirdary"
|
|
163
|
+
filled
|
|
202
164
|
:disabled="isDatePeriodOutOfRange(date)"
|
|
203
|
-
v-bind="
|
|
165
|
+
v-bind="periodDateCurrentAttrs"
|
|
204
166
|
:label="String(date.title)"
|
|
205
|
-
:class="{ 'rounded-dynamic': getDatePeriodState(date, index).isSingleItem }"
|
|
206
167
|
@click="selectDate(date), toggleMenu()"
|
|
207
168
|
/>
|
|
208
169
|
|
|
@@ -296,12 +257,9 @@ const {
|
|
|
296
257
|
rangeSwitchButtonAttrs,
|
|
297
258
|
rangeSwitchTitleAttrs,
|
|
298
259
|
periodDateListAttrs,
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
lastPeriodGridDateAttrs,
|
|
303
|
-
lastPeriodListDateAttrs,
|
|
304
|
-
periodDateInRangeAttrs,
|
|
260
|
+
periodDateSelectedAttrs,
|
|
261
|
+
periodDateCurrentSelectedAttrs,
|
|
262
|
+
periodDateCurrentAttrs,
|
|
305
263
|
periodDateAttrs,
|
|
306
264
|
} = props.attrs;
|
|
307
265
|
|
|
@@ -312,8 +270,6 @@ const periods = computed(() => [
|
|
|
312
270
|
{ name: PERIOD.year, title: props.locale.year },
|
|
313
271
|
]);
|
|
314
272
|
|
|
315
|
-
const isListType = computed(() => props.isPeriod.quarter || props.isPeriod.week);
|
|
316
|
-
|
|
317
273
|
const rangeSwitchTitle = computed(() => {
|
|
318
274
|
if (props.isPeriod.month || props.isPeriod.quarter) {
|
|
319
275
|
return String(activeDate.value.getFullYear());
|
|
@@ -387,7 +343,7 @@ function selectCustomRange() {
|
|
|
387
343
|
};
|
|
388
344
|
}
|
|
389
345
|
|
|
390
|
-
function getDatePeriodState(date
|
|
346
|
+
function getDatePeriodState(date) {
|
|
391
347
|
const localStart = new Date(localValue.value.from);
|
|
392
348
|
const localEnd = new Date(localValue.value.to);
|
|
393
349
|
|
|
@@ -399,38 +355,9 @@ function getDatePeriodState(date, index) {
|
|
|
399
355
|
localStart.setHours(0, 0, 0, 0);
|
|
400
356
|
localEnd.setHours(23, 59, 59, 999);
|
|
401
357
|
|
|
402
|
-
const
|
|
403
|
-
|
|
404
|
-
});
|
|
405
|
-
|
|
406
|
-
const endDateInRangeIndex = periodDateList.value.findIndex((periodDate) => {
|
|
407
|
-
return localEnd >= periodDate.startRange && localEnd <= periodDate.endRange;
|
|
408
|
-
});
|
|
409
|
-
|
|
410
|
-
let isInRange = index >= startDateInRangeIndex && index <= endDateInRangeIndex;
|
|
411
|
-
|
|
412
|
-
if (!~startDateInRangeIndex || !~endDateInRangeIndex) {
|
|
413
|
-
isInRange =
|
|
414
|
-
(index >= startDateInRangeIndex && startDateInRangeIndex > -1) ||
|
|
415
|
-
(index <= endDateInRangeIndex && endDateInRangeIndex > -1);
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
if (
|
|
419
|
-
!~startDateInRangeIndex &&
|
|
420
|
-
periodDateList.value.at(0).startRange > localStart &&
|
|
421
|
-
!~endDateInRangeIndex &&
|
|
422
|
-
periodDateList.value.at(0).endRange < localEnd
|
|
423
|
-
) {
|
|
424
|
-
isInRange = true;
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
const isSingleItem =
|
|
428
|
-
startDateInRangeIndex === endDateInRangeIndex && ~endDateInRangeIndex && ~startDateInRangeIndex;
|
|
429
|
-
|
|
430
|
-
const isFirstInRange = startDateInRangeIndex === index;
|
|
431
|
-
const isLastInRange = endDateInRangeIndex === index;
|
|
432
|
-
const isActive = localValue.value.from === date.startRange;
|
|
358
|
+
const isSelected = localStart - date.startRange === 0 && localEnd - date.endRange === 0;
|
|
359
|
+
const isCurrentDate = date.startRange <= new Date() && new Date() <= date.endRange;
|
|
433
360
|
|
|
434
|
-
return {
|
|
361
|
+
return { isSelected, isCurrentDate };
|
|
435
362
|
}
|
|
436
363
|
</script>
|
|
@@ -60,13 +60,9 @@ export default /*tw*/ {
|
|
|
60
60
|
periodDateYearList: "grid grid-cols-3 grid-rows-1 gap-0.5",
|
|
61
61
|
periodDateQuarterList: "",
|
|
62
62
|
periodDate: "w-full",
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
lastPeriodGridDate: "rounded-l-none",
|
|
67
|
-
firstPeriodListDate: "rounded-b-none",
|
|
68
|
-
lastPeriodListDate: "rounded-t-none",
|
|
69
|
-
periodDateActive: "bg-gray-100",
|
|
63
|
+
periodDateSelected: "",
|
|
64
|
+
periodDateCurrent: "border-2 border-brand-600",
|
|
65
|
+
periodDateCurrentSelected: "",
|
|
70
66
|
customRangeDescription: "",
|
|
71
67
|
rangeInputWrapper: "flex mt-4 -space-x-px group/range-input-wrapper",
|
|
72
68
|
rangeInputFirst: {
|
|
@@ -19,12 +19,7 @@ export default function useAttrs(props, { isShownMenu, isTop, isRight, isPeriod
|
|
|
19
19
|
description: Boolean(props.description),
|
|
20
20
|
}));
|
|
21
21
|
|
|
22
|
-
const extendingKeys = [
|
|
23
|
-
"buttonWrapperActive",
|
|
24
|
-
"buttonActive",
|
|
25
|
-
"edgePeriodDate",
|
|
26
|
-
"periodDateMonthList",
|
|
27
|
-
];
|
|
22
|
+
const extendingKeys = ["buttonWrapperActive", "buttonActive", "periodDateMonthList"];
|
|
28
23
|
const extendingKeysClasses = getExtendingKeysClasses(
|
|
29
24
|
[
|
|
30
25
|
...extendingKeys,
|
|
@@ -34,6 +29,8 @@ export default function useAttrs(props, { isShownMenu, isTop, isRight, isPeriod
|
|
|
34
29
|
"periodDateWeekList",
|
|
35
30
|
"periodDateQuarterList",
|
|
36
31
|
"periodDateYearList",
|
|
32
|
+
"periodDateSelected",
|
|
33
|
+
"periodDateCurrent",
|
|
37
34
|
],
|
|
38
35
|
mutatedProps,
|
|
39
36
|
);
|
|
@@ -65,34 +62,20 @@ export default function useAttrs(props, { isShownMenu, isTop, isRight, isPeriod
|
|
|
65
62
|
periodDateYearList: {
|
|
66
63
|
base: computed(() => [extendingKeysClasses.periodDateList.value]),
|
|
67
64
|
},
|
|
68
|
-
|
|
65
|
+
periodDateSelected: {
|
|
69
66
|
base: computed(() => [extendingKeysClasses.periodDate.value]),
|
|
70
67
|
},
|
|
71
|
-
|
|
72
|
-
base: computed(() => [extendingKeysClasses.periodDate.value]),
|
|
73
|
-
},
|
|
74
|
-
firstPeriodGridDate: {
|
|
75
|
-
base: computed(() => [
|
|
76
|
-
extendingKeysClasses.periodDate.value,
|
|
77
|
-
extendingKeysClasses.edgePeriodDate.value,
|
|
78
|
-
]),
|
|
79
|
-
},
|
|
80
|
-
firstPeriodListDate: {
|
|
81
|
-
base: computed(() => [
|
|
82
|
-
extendingKeysClasses.periodDate.value,
|
|
83
|
-
extendingKeysClasses.edgePeriodDate.value,
|
|
84
|
-
]),
|
|
85
|
-
},
|
|
86
|
-
lastPeriodGridDate: {
|
|
68
|
+
periodDateCurrent: {
|
|
87
69
|
base: computed(() => [
|
|
88
70
|
extendingKeysClasses.periodDate.value,
|
|
89
|
-
extendingKeysClasses.
|
|
71
|
+
extendingKeysClasses.periodDateCurrent.value,
|
|
90
72
|
]),
|
|
91
73
|
},
|
|
92
|
-
|
|
74
|
+
periodDateCurrentSelected: {
|
|
93
75
|
base: computed(() => [
|
|
94
76
|
extendingKeysClasses.periodDate.value,
|
|
95
|
-
extendingKeysClasses.
|
|
77
|
+
extendingKeysClasses.periodDateSelected.value,
|
|
78
|
+
extendingKeysClasses.periodDateCurrent.value,
|
|
96
79
|
]),
|
|
97
80
|
},
|
|
98
81
|
});
|