vueless 0.0.218 → 0.0.219
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 +1 -1
- package/ui.button/configs/default.config.js +6 -6
- package/ui.button/index.vue +14 -2
- package/ui.form-date-picker-range/configs/default.config.js +18 -24
- package/ui.form-date-picker-range/index.vue +48 -64
- package/ui.form-input/configs/default.config.js +2 -2
- package/ui.form-input/index.vue +2 -2
- package/ui.form-select/index.vue +2 -2
- package/web-types.json +2 -2
package/package.json
CHANGED
|
@@ -130,12 +130,6 @@ export default /*tw*/ {
|
|
|
130
130
|
class: "bg-gray-800 bg-opacity-10 hover:bg-opacity-15 focus:bg-opacity-15 active:bg-opacity-20",
|
|
131
131
|
},
|
|
132
132
|
{ filled: true, variant: "thirdary", color: "white", class: "bg-gray-50" },
|
|
133
|
-
{ square: true, size: "2xs", class: "p-1" },
|
|
134
|
-
{ square: true, size: "xs", class: "p-1.5" },
|
|
135
|
-
{ square: true, size: "sm", class: "p-2" },
|
|
136
|
-
{ square: true, size: "md", class: "p-3" },
|
|
137
|
-
{ square: true, size: "lg", class: "p-3.5" },
|
|
138
|
-
{ square: true, size: "xl", class: "p-4" },
|
|
139
133
|
{ iconLeft: true, size: "2xs", class: "pl-1" },
|
|
140
134
|
{ iconLeft: true, size: "xs", class: "pl-1.5" },
|
|
141
135
|
{ iconLeft: true, size: "sm", class: "pl-2" },
|
|
@@ -148,6 +142,12 @@ export default /*tw*/ {
|
|
|
148
142
|
{ iconRight: true, size: "md", class: "pr-4" },
|
|
149
143
|
{ iconRight: true, size: "lg", class: "pr-5" },
|
|
150
144
|
{ iconRight: true, size: "xl", class: "pr-6" },
|
|
145
|
+
{ square: true, size: "2xs", class: "p-1" },
|
|
146
|
+
{ square: true, size: "xs", class: "p-1.5" },
|
|
147
|
+
{ square: true, size: "sm", class: "p-2" },
|
|
148
|
+
{ square: true, size: "md", class: "p-3" },
|
|
149
|
+
{ square: true, size: "lg", class: "p-3.5" },
|
|
150
|
+
{ square: true, size: "xl", class: "p-4" },
|
|
151
151
|
],
|
|
152
152
|
},
|
|
153
153
|
text: "whitespace-nowrap focus-visible:outline-none",
|
package/ui.button/index.vue
CHANGED
|
@@ -27,7 +27,13 @@
|
|
|
27
27
|
:icon-size="iconSize"
|
|
28
28
|
:icon-color="componentColor"
|
|
29
29
|
>
|
|
30
|
-
<UIcon
|
|
30
|
+
<UIcon
|
|
31
|
+
v-if="iconLeft"
|
|
32
|
+
:name="iconLeft"
|
|
33
|
+
:size="iconSize"
|
|
34
|
+
:color="componentColor"
|
|
35
|
+
internal
|
|
36
|
+
/>
|
|
31
37
|
</slot>
|
|
32
38
|
</div>
|
|
33
39
|
|
|
@@ -59,7 +65,13 @@
|
|
|
59
65
|
:icon-size="iconSize"
|
|
60
66
|
:icon-color="componentColor"
|
|
61
67
|
>
|
|
62
|
-
<UIcon
|
|
68
|
+
<UIcon
|
|
69
|
+
v-if="iconRight"
|
|
70
|
+
:name="iconRight"
|
|
71
|
+
:size="iconSize"
|
|
72
|
+
:color="componentColor"
|
|
73
|
+
internal
|
|
74
|
+
/>
|
|
63
75
|
</slot>
|
|
64
76
|
</div>
|
|
65
77
|
</template>
|
|
@@ -8,10 +8,12 @@ export default /*tw*/ {
|
|
|
8
8
|
flex rounded-lg max-md:justify-between
|
|
9
9
|
focus-within:ring-4 focus-within:ring-brand-700 focus-within:ring-opacity-20
|
|
10
10
|
`,
|
|
11
|
-
button: "{UButton} shrink-0 grow rounded-none
|
|
11
|
+
button: "{UButton} shrink-0 grow rounded-none !ring-0",
|
|
12
12
|
buttonActive: "ring-0",
|
|
13
13
|
buttonWrapperActive: "ring-4 ring-brand-700 ring-opacity-20",
|
|
14
14
|
shiftRangeButton: "focus:ring-0 last:rounded-l-none last:rounded-r-lg first:rounded-l-lg first:rounded-r-none",
|
|
15
|
+
nextIconName: "keyboard_arrow_right",
|
|
16
|
+
prevIconName: "keyboard_arrow_left",
|
|
15
17
|
menu: {
|
|
16
18
|
base: "absolute z-40 my-2 w-80 overflow-hidden rounded-lg border border-brand-300 bg-white p-2 shadow focus:outline-none",
|
|
17
19
|
variants: {
|
|
@@ -33,19 +35,12 @@ export default /*tw*/ {
|
|
|
33
35
|
leaveToClass: "opacity-0 scale-95",
|
|
34
36
|
},
|
|
35
37
|
periodsRow: "mb-1 flex min-w-64 gap-1",
|
|
36
|
-
periodButton:
|
|
37
|
-
{UButton} h-[3.125rem] w-full flex flex-col items-center justify-center
|
|
38
|
-
[&_span]:block [&_span]:font-normal [&_span]:text-brand-500
|
|
39
|
-
`,
|
|
40
|
-
periodButtonIcon: "{UIcon}",
|
|
38
|
+
periodButton: "{UButton} h-[3.125rem] w-full !ring-0",
|
|
41
39
|
periodButtonIconName: "apps",
|
|
42
|
-
periodButtonActive: "bg-
|
|
40
|
+
periodButtonActive: "!bg-opacity-20",
|
|
43
41
|
rangeSwitchWrapper: "flex items-center justify-between py-2",
|
|
42
|
+
rangeSwitchButton: "{UButton}",
|
|
44
43
|
rangeSwitchTitle: "font-medium text-sm",
|
|
45
|
-
nextIcon: "{UIcon}",
|
|
46
|
-
nextIconName: "keyboard_arrow_right",
|
|
47
|
-
prevIcon: "{UIcon}",
|
|
48
|
-
prevIconName: "keyboard_arrow_left",
|
|
49
44
|
periodDateList: "",
|
|
50
45
|
periodDateMonthList: "grid grid-cols-3 grid-rows-1 gap-0.5",
|
|
51
46
|
periodDateWeekList: "",
|
|
@@ -53,25 +48,24 @@ export default /*tw*/ {
|
|
|
53
48
|
periodDateQuarterList: "",
|
|
54
49
|
periodDate: "w-full",
|
|
55
50
|
periodDateActive: "bg-gray-100",
|
|
56
|
-
rangeInputWrapper: "flex mt-4",
|
|
51
|
+
rangeInputWrapper: "flex mt-4 -space-x-px",
|
|
57
52
|
rangeInput: {
|
|
58
|
-
|
|
53
|
+
component: "{UInput}",
|
|
59
54
|
label: {
|
|
60
|
-
|
|
55
|
+
component: "{ULabel}",
|
|
56
|
+
wrapper: "group/range-input-wrapper w-full hover:z-10 focus:z-10",
|
|
61
57
|
description: "hidden",
|
|
62
58
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
},
|
|
59
|
+
block: `
|
|
60
|
+
focus-within:z-10 focus-within:ring-0
|
|
61
|
+
group-first/range-input-wrapper:rounded-r-none group-last/range-input-wrapper:rounded-l-none
|
|
62
|
+
`,
|
|
63
|
+
input: "group-first/range-input-wrapper:rounded-r-none group-last/range-input-wrapper:rounded-l-none",
|
|
71
64
|
},
|
|
72
|
-
inputRangeError: "text-xs font-normal
|
|
65
|
+
inputRangeError: "text-xs font-normal leading-none mt-2 text-center text-red-500",
|
|
73
66
|
calendar: {
|
|
74
|
-
|
|
67
|
+
component: "{UCalendar}",
|
|
68
|
+
wrapper: "p-0 mt-2 w-full border-none shadow-none",
|
|
75
69
|
navigation: "mb-0 border-none",
|
|
76
70
|
navigationSwitchViewButton: "rounded-lg px-3",
|
|
77
71
|
day: "w-full h-10 mb-0.5",
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
:id="id"
|
|
6
6
|
ref="inputRef"
|
|
7
7
|
v-model="userFormatDate"
|
|
8
|
+
:size="size"
|
|
8
9
|
:label="label"
|
|
10
|
+
:disabled="disabled"
|
|
9
11
|
:placeholder="placeholder"
|
|
10
|
-
:error="error"
|
|
11
12
|
:description="description"
|
|
13
|
+
:error="error"
|
|
12
14
|
readonly
|
|
13
|
-
:disabled="disabled"
|
|
14
|
-
:size="size"
|
|
15
15
|
v-bind="inputAttrs"
|
|
16
16
|
@focus="activate"
|
|
17
17
|
>
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
<slot name="left" />
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
|
-
<template #right
|
|
23
|
-
<slot name="right
|
|
22
|
+
<template #icon-right>
|
|
23
|
+
<slot name="icon-right" />
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
26
|
<template #right>
|
|
@@ -36,21 +36,20 @@
|
|
|
36
36
|
:disabled="disabled"
|
|
37
37
|
variant="thirdary"
|
|
38
38
|
filled
|
|
39
|
+
:icon-left="config.prevIconName"
|
|
39
40
|
v-bind="shiftRangeButtonAttrs"
|
|
40
41
|
@click="onClickShiftRange('prev')"
|
|
41
|
-
|
|
42
|
-
<UIcon internal interactive size="sm" :name="config.prevIconName" v-bind="prevIconAttrs" />
|
|
43
|
-
</UButton>
|
|
42
|
+
/>
|
|
44
43
|
|
|
45
44
|
<UButton
|
|
46
45
|
:id="id"
|
|
47
46
|
ref="buttonRef"
|
|
48
47
|
square
|
|
48
|
+
filled
|
|
49
49
|
:size="size"
|
|
50
50
|
:disabled="disabled"
|
|
51
51
|
:label="userFormatDate"
|
|
52
52
|
variant="thirdary"
|
|
53
|
-
filled
|
|
54
53
|
v-bind="buttonAttrs"
|
|
55
54
|
@click="activate"
|
|
56
55
|
/>
|
|
@@ -58,15 +57,14 @@
|
|
|
58
57
|
<UButton
|
|
59
58
|
ref="buttonNextRef"
|
|
60
59
|
square
|
|
60
|
+
filled
|
|
61
61
|
:size="size"
|
|
62
62
|
:disabled="disabled"
|
|
63
63
|
variant="thirdary"
|
|
64
|
-
|
|
64
|
+
:icon-left="config.nextIconName"
|
|
65
65
|
v-bind="shiftRangeButtonAttrs"
|
|
66
66
|
@click="onClickShiftRange('next')"
|
|
67
|
-
|
|
68
|
-
<UIcon internal interactive size="sm" :name="config.nextIconName" v-bind="nextIconAttrs" />
|
|
69
|
-
</UButton>
|
|
67
|
+
/>
|
|
70
68
|
</div>
|
|
71
69
|
|
|
72
70
|
<Transition v-bind="config.menuTransition">
|
|
@@ -82,12 +80,11 @@
|
|
|
82
80
|
<UButton
|
|
83
81
|
v-for="periodButton in periods"
|
|
84
82
|
:key="periodButton.name"
|
|
85
|
-
:label="periodButton.title"
|
|
86
|
-
variant="thirdary"
|
|
87
|
-
size="xs"
|
|
88
83
|
square
|
|
89
84
|
filled
|
|
90
|
-
|
|
85
|
+
size="xs"
|
|
86
|
+
variant="thirdary"
|
|
87
|
+
:label="periodButton.title"
|
|
91
88
|
v-bind="periodButtonAttrs(getPeriodButtonsClasses(periodButton.name))"
|
|
92
89
|
@click="onClickPeriodButton(periodButton.name)"
|
|
93
90
|
/>
|
|
@@ -96,9 +93,10 @@
|
|
|
96
93
|
<div v-bind="periodsRowAttrs">
|
|
97
94
|
<UButton
|
|
98
95
|
v-if="customRangeButton.range.to && customRangeButton.range.from"
|
|
99
|
-
|
|
96
|
+
square
|
|
100
97
|
filled
|
|
101
|
-
|
|
98
|
+
size="xs"
|
|
99
|
+
variant="thirdary"
|
|
102
100
|
v-bind="periodButtonAttrs(getPeriodButtonsClasses(PERIOD.custom))"
|
|
103
101
|
@click="onClickCustomRangeButton"
|
|
104
102
|
>
|
|
@@ -107,62 +105,51 @@
|
|
|
107
105
|
</UButton>
|
|
108
106
|
|
|
109
107
|
<UButton
|
|
110
|
-
|
|
111
|
-
size="xs"
|
|
108
|
+
square
|
|
112
109
|
filled
|
|
113
|
-
|
|
110
|
+
size="xs"
|
|
111
|
+
variant="thirdary"
|
|
112
|
+
:label="locale.ownRange"
|
|
113
|
+
:icon-left="config.periodButtonIconName"
|
|
114
114
|
v-bind="periodButtonAttrs(getPeriodButtonsClasses(PERIOD.ownRange))"
|
|
115
115
|
@click="onClickOwnRange"
|
|
116
|
-
|
|
117
|
-
<UIcon
|
|
118
|
-
internal
|
|
119
|
-
:name="config.periodButtonIconName"
|
|
120
|
-
size="xs"
|
|
121
|
-
v-bind="periodButtonIconAttrs"
|
|
122
|
-
/>
|
|
123
|
-
{{ locale.ownRange }}
|
|
124
|
-
</UButton>
|
|
116
|
+
/>
|
|
125
117
|
</div>
|
|
126
118
|
|
|
127
119
|
<template v-if="!isPeriod.ownRange && !isPeriod.custom">
|
|
128
120
|
<div v-bind="rangeSwitchWrapperAttrs">
|
|
129
|
-
<UButton
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
/>
|
|
139
|
-
</UButton>
|
|
121
|
+
<UButton
|
|
122
|
+
square
|
|
123
|
+
size="xs"
|
|
124
|
+
color="gray"
|
|
125
|
+
variant="thirdary"
|
|
126
|
+
:icon-left="config.prevIconName"
|
|
127
|
+
v-bind="rangeSwitchButtonAttrs"
|
|
128
|
+
@click="onClickShiftDatesList('prev')"
|
|
129
|
+
/>
|
|
140
130
|
|
|
141
131
|
<div v-bind="rangeSwitchTitleAttrs">
|
|
142
132
|
{{ rangeSwitchTitle }}
|
|
143
133
|
</div>
|
|
144
134
|
|
|
145
|
-
<UButton
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
/>
|
|
155
|
-
</UButton>
|
|
135
|
+
<UButton
|
|
136
|
+
square
|
|
137
|
+
size="xs"
|
|
138
|
+
color="gray"
|
|
139
|
+
variant="thirdary"
|
|
140
|
+
:icon-left="config.nextIconName"
|
|
141
|
+
v-bind="rangeSwitchButtonAttrs"
|
|
142
|
+
@click="onClickShiftDatesList('next')"
|
|
143
|
+
/>
|
|
156
144
|
</div>
|
|
157
145
|
|
|
158
146
|
<div v-bind="periodDateListAttrs(getPeriodDateListClasses())">
|
|
159
147
|
<UButton
|
|
160
148
|
v-for="date in periodDateList"
|
|
161
149
|
:key="date.title"
|
|
162
|
-
:disabled="isDatePeriodOutOfRange(date)"
|
|
163
|
-
variant="thirdary"
|
|
164
|
-
color="brand"
|
|
165
150
|
size="sm"
|
|
151
|
+
variant="thirdary"
|
|
152
|
+
:disabled="isDatePeriodOutOfRange(date)"
|
|
166
153
|
v-bind="periodDateAttrs(getPeriodDateClasses(date))"
|
|
167
154
|
:label="String(date.title)"
|
|
168
155
|
@click="selectDate(date), toggleMenu()"
|
|
@@ -175,7 +162,7 @@
|
|
|
175
162
|
ref="rangeInputStartRef"
|
|
176
163
|
v-model="rangeStart"
|
|
177
164
|
:error="inputRangeFromError"
|
|
178
|
-
size="
|
|
165
|
+
size="md"
|
|
179
166
|
v-bind="rangeInputAttrs"
|
|
180
167
|
:name="rangeInputName"
|
|
181
168
|
@input="onInputRangeInput($event, INPUT_RANGE_TYPE.start)"
|
|
@@ -185,14 +172,14 @@
|
|
|
185
172
|
ref="rangeInputEndRef"
|
|
186
173
|
v-model="rangeEnd"
|
|
187
174
|
:error="inputRangeToError"
|
|
188
|
-
size="
|
|
175
|
+
size="md"
|
|
189
176
|
v-bind="rangeInputAttrs"
|
|
190
177
|
:name="rangeInputName"
|
|
191
178
|
@input="onInputRangeInput($event, INPUT_RANGE_TYPE.end)"
|
|
192
179
|
/>
|
|
193
180
|
</div>
|
|
194
181
|
|
|
195
|
-
<div v-bind="inputRangeErrorAttrs">
|
|
182
|
+
<div v-if="inputRangeToError || inputRangeFromError" v-bind="inputRangeErrorAttrs">
|
|
196
183
|
{{ inputRangeToError || inputRangeFromError }}
|
|
197
184
|
</div>
|
|
198
185
|
|
|
@@ -216,7 +203,6 @@
|
|
|
216
203
|
import { computed, watch, ref, nextTick } from "vue";
|
|
217
204
|
import { merge } from "lodash-es";
|
|
218
205
|
|
|
219
|
-
import UIcon from "../ui.image-icon";
|
|
220
206
|
import UInput from "../ui.form-input";
|
|
221
207
|
import UButton from "../ui.button";
|
|
222
208
|
import UCalendar from "../ui.form-calendar";
|
|
@@ -469,12 +455,10 @@ const {
|
|
|
469
455
|
menuAttrs,
|
|
470
456
|
periodsRowAttrs,
|
|
471
457
|
periodButtonAttrs,
|
|
472
|
-
periodButtonIconAttrs,
|
|
473
|
-
rangeSwitchWrapperAttrs,
|
|
474
|
-
nextIconAttrs,
|
|
475
|
-
prevIconAttrs,
|
|
476
458
|
periodDateAttrs,
|
|
477
459
|
periodDateListAttrs,
|
|
460
|
+
rangeSwitchWrapperAttrs,
|
|
461
|
+
rangeSwitchButtonAttrs,
|
|
478
462
|
rangeSwitchTitleAttrs,
|
|
479
463
|
buttonWrapperAttrs,
|
|
480
464
|
buttonAttrs,
|
|
@@ -22,7 +22,7 @@ export default /*tw*/ {
|
|
|
22
22
|
},
|
|
23
23
|
error: {
|
|
24
24
|
true: `
|
|
25
|
-
|
|
25
|
+
border-red-300
|
|
26
26
|
hover:border-red-400 hover:focus-within:border-red-500
|
|
27
27
|
focus-within:border-red-500 focus-within:ring-red-100
|
|
28
28
|
`,
|
|
@@ -47,7 +47,7 @@ export default /*tw*/ {
|
|
|
47
47
|
},
|
|
48
48
|
error: {
|
|
49
49
|
true: `
|
|
50
|
-
bg-red-50
|
|
50
|
+
bg-red-50 hover:border-red-400 focus:border-red-500 focus:ring-red-100
|
|
51
51
|
focus-within:border-red-500 focus-within:ring-red-100
|
|
52
52
|
`,
|
|
53
53
|
},
|
package/ui.form-input/index.vue
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
@binding {string} icon-size
|
|
24
24
|
-->
|
|
25
25
|
<slot name="icon-left" :icon-name="iconLeft" :icon-size="iconSize">
|
|
26
|
-
<UIcon v-if="iconLeft" :name="iconLeft" :size="iconSize" />
|
|
26
|
+
<UIcon v-if="iconLeft" :name="iconLeft" :size="iconSize" internal />
|
|
27
27
|
</slot>
|
|
28
28
|
</span>
|
|
29
29
|
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
@binding {string} icon-size
|
|
78
78
|
-->
|
|
79
79
|
<slot name="icon-right" :icon-name="iconLeft" :icon-size="iconSize">
|
|
80
|
-
<UIcon v-if="iconRight" :name="iconRight" :size="iconSize" />
|
|
80
|
+
<UIcon v-if="iconRight" :name="iconRight" :size="iconSize" internal />
|
|
81
81
|
</slot>
|
|
82
82
|
</span>
|
|
83
83
|
</label>
|
package/ui.form-select/index.vue
CHANGED
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
@binding {string} icon-size
|
|
86
86
|
-->
|
|
87
87
|
<slot name="icon-left" :icon-name="iconLeft" :icon-size="iconSize">
|
|
88
|
-
<UIcon v-if="iconLeft" :name="iconLeft" :size="iconSize" />
|
|
88
|
+
<UIcon v-if="iconLeft" :name="iconLeft" :size="iconSize" internal />
|
|
89
89
|
</slot>
|
|
90
90
|
</span>
|
|
91
91
|
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
@binding {string} icon-size
|
|
197
197
|
-->
|
|
198
198
|
<slot name="icon-right" :icon-name="iconRight" :icon-size="iconSize">
|
|
199
|
-
<UIcon v-if="iconRight" :name="iconRight" :size="iconSize" />
|
|
199
|
+
<UIcon v-if="iconRight" :name="iconRight" :size="iconSize" internal />
|
|
200
200
|
</slot>
|
|
201
201
|
</span>
|
|
202
202
|
</div>
|
package/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.219",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -2349,7 +2349,7 @@
|
|
|
2349
2349
|
"name": "left"
|
|
2350
2350
|
},
|
|
2351
2351
|
{
|
|
2352
|
-
"name": "right
|
|
2352
|
+
"name": "icon-right"
|
|
2353
2353
|
},
|
|
2354
2354
|
{
|
|
2355
2355
|
"name": "right"
|