vueless 0.0.282 → 0.0.283
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/composables/attrs.composable.js +2 -2
- package/ui.button/configs/default.config.js +14 -14
- package/ui.button/index.stories.js +12 -12
- package/ui.button/index.vue +15 -15
- package/ui.dropdown-button/index.vue +1 -1
- package/ui.form-calendar/index.vue +3 -3
- package/ui.form-date-picker-range/index.vue +7 -7
- package/ui.form-input/configs/default.config.js +2 -2
- package/ui.form-input/index.stories.js +12 -12
- package/ui.form-input/index.vue +23 -9
- package/ui.form-input-file/index.vue +2 -2
- package/ui.form-input-search/index.vue +4 -4
- package/ui.form-select/configs/default.config.js +2 -2
- package/ui.form-select/index.stories.js +12 -12
- package/ui.form-select/index.vue +15 -15
- package/web-types.json +16 -16
package/package.json
CHANGED
|
@@ -22,8 +22,8 @@ export default function useAttrs(props) {
|
|
|
22
22
|
...props,
|
|
23
23
|
color: getColor(props.color),
|
|
24
24
|
square: props.loading || props.square,
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
leftIcon: Boolean(props.iconLeft) || hasSlotContent(slots["left-icon"]),
|
|
26
|
+
rightIcon: Boolean(props.iconRight) || hasSlotContent(slots["right-icon"]),
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -124,18 +124,18 @@ export default /*tw*/ {
|
|
|
124
124
|
{ filled: true, variant: "thirdary", class: "bg-{color}-600/10" },
|
|
125
125
|
{ filled: true, variant: "thirdary", color: "grayscale", class: "bg-gray-900/10" },
|
|
126
126
|
{ filled: true, variant: "thirdary", color: "white", class: "bg-gray-50" },
|
|
127
|
-
{
|
|
128
|
-
{
|
|
129
|
-
{
|
|
130
|
-
{
|
|
131
|
-
{
|
|
132
|
-
{
|
|
133
|
-
{
|
|
134
|
-
{
|
|
135
|
-
{
|
|
136
|
-
{
|
|
137
|
-
{
|
|
138
|
-
{
|
|
127
|
+
{ leftIcon: true, size: "2xs", class: "pl-1" },
|
|
128
|
+
{ leftIcon: true, size: "xs", class: "pl-2" },
|
|
129
|
+
{ leftIcon: true, size: "sm", class: "pl-3" },
|
|
130
|
+
{ leftIcon: true, size: "md", class: "pl-4" },
|
|
131
|
+
{ leftIcon: true, size: "lg", class: "pl-5" },
|
|
132
|
+
{ leftIcon: true, size: "xl", class: "pl-6" },
|
|
133
|
+
{ rightIcon: true, size: "2xs", class: "pr-1" },
|
|
134
|
+
{ rightIcon: true, size: "xs", class: "pr-2" },
|
|
135
|
+
{ rightIcon: true, size: "sm", class: "pr-3" },
|
|
136
|
+
{ rightIcon: true, size: "md", class: "pr-4" },
|
|
137
|
+
{ rightIcon: true, size: "lg", class: "pr-5" },
|
|
138
|
+
{ rightIcon: true, size: "xl", class: "pr-6" },
|
|
139
139
|
{ square: true, size: "2xs", class: "p-1" },
|
|
140
140
|
{ square: true, size: "xs", class: "p-1.5" },
|
|
141
141
|
{ square: true, size: "sm", class: "p-2" },
|
|
@@ -145,8 +145,8 @@ export default /*tw*/ {
|
|
|
145
145
|
],
|
|
146
146
|
},
|
|
147
147
|
text: "whitespace-nowrap focus-visible:outline-none",
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
leftIcon: "{UIcon}",
|
|
149
|
+
rightIcon: "{UIcon}",
|
|
150
150
|
defaultVariants: {
|
|
151
151
|
color: "brand",
|
|
152
152
|
variant: "primary",
|
|
@@ -100,14 +100,14 @@ noRing.args = { noRing: true };
|
|
|
100
100
|
export const colors = ColorTemplate.bind({});
|
|
101
101
|
colors.args = {};
|
|
102
102
|
|
|
103
|
-
export const
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
export const leftIcon = DefaultTemplate.bind({});
|
|
104
|
+
leftIcon.args = {
|
|
105
|
+
leftIcon: "star",
|
|
106
106
|
};
|
|
107
107
|
|
|
108
|
-
export const
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
export const rightIcon = DefaultTemplate.bind({});
|
|
109
|
+
rightIcon.args = {
|
|
110
|
+
rightIcon: "star",
|
|
111
111
|
};
|
|
112
112
|
|
|
113
113
|
export const slotDefault = DefaultTemplate.bind({});
|
|
@@ -119,10 +119,10 @@ slotDefault.args = {
|
|
|
119
119
|
`,
|
|
120
120
|
};
|
|
121
121
|
|
|
122
|
-
export const
|
|
123
|
-
|
|
122
|
+
export const leftIconSlot = DefaultTemplate.bind({});
|
|
123
|
+
leftIconSlot.args = {
|
|
124
124
|
slotTemplate: `
|
|
125
|
-
<template #icon
|
|
125
|
+
<template #left-icon>
|
|
126
126
|
<UIcon
|
|
127
127
|
name="star"
|
|
128
128
|
color="green"
|
|
@@ -131,10 +131,10 @@ iconLeftSlot.args = {
|
|
|
131
131
|
`,
|
|
132
132
|
};
|
|
133
133
|
|
|
134
|
-
export const
|
|
135
|
-
|
|
134
|
+
export const rightIconSlot = DefaultTemplate.bind({});
|
|
135
|
+
rightIconSlot.args = {
|
|
136
136
|
slotTemplate: `
|
|
137
|
-
<template #icon
|
|
137
|
+
<template #right-icon>
|
|
138
138
|
<UIcon
|
|
139
139
|
name="star"
|
|
140
140
|
color="green"
|
package/ui.button/index.vue
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<template v-else>
|
|
17
|
-
<div v-if="hasSlotContent($slots['icon
|
|
17
|
+
<div v-if="hasSlotContent($slots['left-icon']) || leftIcon">
|
|
18
18
|
<!--
|
|
19
19
|
@slot Use it to add icon before the text.
|
|
20
20
|
@binding {string} icon-name
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
@binding {string} icon-color
|
|
23
23
|
-->
|
|
24
24
|
<slot
|
|
25
|
-
name="icon
|
|
26
|
-
:icon-name="
|
|
25
|
+
name="left-icon"
|
|
26
|
+
:icon-name="leftIcon"
|
|
27
27
|
:icon-size="iconSize"
|
|
28
28
|
:icon-color="componentColor"
|
|
29
29
|
>
|
|
30
30
|
<UIcon
|
|
31
|
-
v-if="
|
|
32
|
-
:name="
|
|
31
|
+
v-if="leftIcon"
|
|
32
|
+
:name="leftIcon"
|
|
33
33
|
:size="iconSize"
|
|
34
34
|
:color="componentColor"
|
|
35
35
|
internal
|
|
36
|
-
v-bind="
|
|
36
|
+
v-bind="leftIconAttrs"
|
|
37
37
|
/>
|
|
38
38
|
</slot>
|
|
39
39
|
</div>
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
<!-- @slot Use it to add something after the text. -->
|
|
54
54
|
<slot name="right" />
|
|
55
55
|
|
|
56
|
-
<div v-if="hasSlotContent($slots['icon
|
|
56
|
+
<div v-if="hasSlotContent($slots['right-icon']) || rightIcon">
|
|
57
57
|
<!--
|
|
58
58
|
@slot Use it to add icon after the text.
|
|
59
59
|
@binding {string} icon-name
|
|
@@ -61,18 +61,18 @@
|
|
|
61
61
|
@binding {string} icon-color
|
|
62
62
|
-->
|
|
63
63
|
<slot
|
|
64
|
-
name="icon
|
|
65
|
-
:icon-name="
|
|
64
|
+
name="right-icon"
|
|
65
|
+
:icon-name="rightIcon"
|
|
66
66
|
:icon-size="iconSize"
|
|
67
67
|
:icon-color="componentColor"
|
|
68
68
|
>
|
|
69
69
|
<UIcon
|
|
70
|
-
v-if="
|
|
71
|
-
:name="
|
|
70
|
+
v-if="rightIcon"
|
|
71
|
+
:name="rightIcon"
|
|
72
72
|
:size="iconSize"
|
|
73
73
|
:color="componentColor"
|
|
74
74
|
internal
|
|
75
|
-
v-bind="
|
|
75
|
+
v-bind="rightIconAttrs"
|
|
76
76
|
/>
|
|
77
77
|
</slot>
|
|
78
78
|
</div>
|
|
@@ -125,7 +125,7 @@ const props = defineProps({
|
|
|
125
125
|
/**
|
|
126
126
|
* Left side icon name.
|
|
127
127
|
*/
|
|
128
|
-
|
|
128
|
+
leftIcon: {
|
|
129
129
|
type: String,
|
|
130
130
|
default: "",
|
|
131
131
|
},
|
|
@@ -133,7 +133,7 @@ const props = defineProps({
|
|
|
133
133
|
/**
|
|
134
134
|
* Right side icon name.
|
|
135
135
|
*/
|
|
136
|
-
|
|
136
|
+
rightIcon: {
|
|
137
137
|
type: String,
|
|
138
138
|
default: "",
|
|
139
139
|
},
|
|
@@ -236,7 +236,7 @@ const props = defineProps({
|
|
|
236
236
|
},
|
|
237
237
|
});
|
|
238
238
|
|
|
239
|
-
const { buttonAttrs, loaderAttrs, textAttrs,
|
|
239
|
+
const { buttonAttrs, loaderAttrs, textAttrs, leftIconAttrs, rightIconAttrs, hasSlotContent } =
|
|
240
240
|
useAttrs(props);
|
|
241
241
|
|
|
242
242
|
const buttonRef = ref(null);
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
no-ring
|
|
12
12
|
size="sm"
|
|
13
13
|
variant="thirdary"
|
|
14
|
-
:icon
|
|
14
|
+
:right-icon="config.dayViewSwitchLabelIconName"
|
|
15
15
|
v-bind="navigationSwitchViewButtonAttrs"
|
|
16
16
|
@mousedown.prevent.capture
|
|
17
17
|
@click="onClickViewSwitch"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
no-ring
|
|
32
32
|
size="sm"
|
|
33
33
|
variant="thirdary"
|
|
34
|
-
:icon
|
|
34
|
+
:left-icon="config.prevIconName"
|
|
35
35
|
v-bind="nextPrevButtonAttrs"
|
|
36
36
|
@mousedown.prevent.capture
|
|
37
37
|
@click="onClickPrevButton"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
no-ring
|
|
45
45
|
size="sm"
|
|
46
46
|
variant="thirdary"
|
|
47
|
-
:icon
|
|
47
|
+
:left-icon="config.nextIconName"
|
|
48
48
|
v-bind="nextPrevButtonAttrs"
|
|
49
49
|
@mousedown.prevent.capture
|
|
50
50
|
@click="onClickNextButton"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
<slot name="left" />
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
|
-
<template #icon
|
|
23
|
-
<slot name="icon
|
|
22
|
+
<template #right-icon>
|
|
23
|
+
<slot name="right-icon" />
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
26
|
<template #right>
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
:size="size"
|
|
38
38
|
:disabled="disabled"
|
|
39
39
|
variant="thirdary"
|
|
40
|
-
:icon
|
|
40
|
+
:left-icon="config.prevIconName"
|
|
41
41
|
v-bind="shiftRangeButtonAttrs"
|
|
42
42
|
@click="onClickShiftRange('prev')"
|
|
43
43
|
/>
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
:size="size"
|
|
65
65
|
:disabled="disabled"
|
|
66
66
|
variant="thirdary"
|
|
67
|
-
:icon
|
|
67
|
+
:left-icon="config.nextIconName"
|
|
68
68
|
v-bind="shiftRangeButtonAttrs"
|
|
69
69
|
@click="onClickShiftRange('next')"
|
|
70
70
|
/>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
size="xs"
|
|
117
117
|
variant="thirdary"
|
|
118
118
|
:label="locale.ownRange"
|
|
119
|
-
:icon
|
|
119
|
+
:left-icon="config.periodButtonIconName"
|
|
120
120
|
v-bind="periodButtonAttrs(getPeriodButtonsClasses(PERIOD.ownRange))"
|
|
121
121
|
@click="onClickOwnRange"
|
|
122
122
|
/>
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
size="xs"
|
|
131
131
|
color="gray"
|
|
132
132
|
variant="thirdary"
|
|
133
|
-
:icon
|
|
133
|
+
:left-icon="config.prevIconName"
|
|
134
134
|
v-bind="rangeSwitchButtonAttrs"
|
|
135
135
|
@click="onClickShiftDatesList('prev')"
|
|
136
136
|
/>
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
size="xs"
|
|
146
146
|
color="gray"
|
|
147
147
|
variant="thirdary"
|
|
148
|
-
:icon
|
|
148
|
+
:left-icon="config.nextIconName"
|
|
149
149
|
v-bind="rangeSwitchButtonAttrs"
|
|
150
150
|
@click="onClickShiftDatesList('next')"
|
|
151
151
|
/>
|
|
@@ -3,8 +3,8 @@ export default /*tw*/ {
|
|
|
3
3
|
inputWrapper: "flex relative w-full",
|
|
4
4
|
rightIconSlot: "flex items-center justify-end whitespace-nowrap pr-2 gap-1 rounded-dynamic rounded-l-none",
|
|
5
5
|
leftIconSlot: "flex items-center justify-end whitespace-nowrap pl-2 gap-1 rounded-dynamic rounded-r-none",
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
leftIcon: "{UIcon}",
|
|
7
|
+
rightIcon: "{UIcon}",
|
|
8
8
|
passwordIcon: "",
|
|
9
9
|
passwordVisibleIconName: "visibility-fill",
|
|
10
10
|
passwordHiddenIconName: "visibility_off-fill",
|
|
@@ -89,20 +89,20 @@ sizes.args = { enum: "size" };
|
|
|
89
89
|
export const validationRules = EnumVariantTemplate.bind({});
|
|
90
90
|
validationRules.args = { enum: "validationRule" };
|
|
91
91
|
|
|
92
|
-
export const
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
export const leftIcon = DefaultTemplate.bind({});
|
|
93
|
+
leftIcon.args = {
|
|
94
|
+
leftIcon: "star",
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
-
export const
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
export const rightIcon = DefaultTemplate.bind({});
|
|
98
|
+
rightIcon.args = {
|
|
99
|
+
rightIcon: "star",
|
|
100
100
|
};
|
|
101
101
|
|
|
102
|
-
export const
|
|
103
|
-
|
|
102
|
+
export const leftIconSlot = DefaultTemplate.bind({});
|
|
103
|
+
leftIconSlot.args = {
|
|
104
104
|
slotTemplate: `
|
|
105
|
-
<template #icon
|
|
105
|
+
<template #left-icon>
|
|
106
106
|
<UIcon
|
|
107
107
|
name="star"
|
|
108
108
|
color="green"
|
|
@@ -111,10 +111,10 @@ iconLeftSlot.args = {
|
|
|
111
111
|
`,
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
-
export const
|
|
115
|
-
|
|
114
|
+
export const rightIconSlot = DefaultTemplate.bind({});
|
|
115
|
+
rightIconSlot.args = {
|
|
116
116
|
slotTemplate: `
|
|
117
|
-
<template #icon
|
|
117
|
+
<template #right-icon>
|
|
118
118
|
<UIcon
|
|
119
119
|
name="star"
|
|
120
120
|
color="green"
|
package/ui.form-input/index.vue
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</span>
|
|
19
19
|
|
|
20
20
|
<span
|
|
21
|
-
v-if="hasSlotContent($slots['icon
|
|
21
|
+
v-if="hasSlotContent($slots['left-icon']) || leftIcon"
|
|
22
22
|
ref="leftSlotWrapperRef"
|
|
23
23
|
v-bind="leftIconSlotAttrs"
|
|
24
24
|
>
|
|
@@ -27,8 +27,14 @@
|
|
|
27
27
|
@binding {string} icon-name
|
|
28
28
|
@binding {string} icon-size
|
|
29
29
|
-->
|
|
30
|
-
<slot name="icon
|
|
31
|
-
<UIcon
|
|
30
|
+
<slot name="left-icon" :icon-name="leftIcon" :icon-size="iconSize">
|
|
31
|
+
<UIcon
|
|
32
|
+
v-if="leftIcon"
|
|
33
|
+
:name="leftIcon"
|
|
34
|
+
:size="iconSize"
|
|
35
|
+
internal
|
|
36
|
+
v-bind="leftIconAttrs"
|
|
37
|
+
/>
|
|
32
38
|
</slot>
|
|
33
39
|
</span>
|
|
34
40
|
|
|
@@ -67,14 +73,20 @@
|
|
|
67
73
|
/>
|
|
68
74
|
</label>
|
|
69
75
|
|
|
70
|
-
<span v-if="hasSlotContent($slots['icon
|
|
76
|
+
<span v-if="hasSlotContent($slots['right-icon']) || rightIcon" v-bind="rightIconSlotAttrs">
|
|
71
77
|
<!--
|
|
72
78
|
@slot Use it to add icon after the text.
|
|
73
79
|
@binding {string} icon-name
|
|
74
80
|
@binding {string} icon-size
|
|
75
81
|
-->
|
|
76
|
-
<slot name="icon
|
|
77
|
-
<UIcon
|
|
82
|
+
<slot name="right-icon" :icon-name="rightIcon" :icon-size="iconSize">
|
|
83
|
+
<UIcon
|
|
84
|
+
v-if="rightIcon"
|
|
85
|
+
:name="rightIcon"
|
|
86
|
+
:size="iconSize"
|
|
87
|
+
internal
|
|
88
|
+
v-bind="rightIconAttrs"
|
|
89
|
+
/>
|
|
78
90
|
</slot>
|
|
79
91
|
</span>
|
|
80
92
|
|
|
@@ -211,7 +223,7 @@ const props = defineProps({
|
|
|
211
223
|
/**
|
|
212
224
|
* Left side icon name.
|
|
213
225
|
*/
|
|
214
|
-
|
|
226
|
+
leftIcon: {
|
|
215
227
|
type: String,
|
|
216
228
|
default: "",
|
|
217
229
|
},
|
|
@@ -219,7 +231,7 @@ const props = defineProps({
|
|
|
219
231
|
/**
|
|
220
232
|
* Right side icon name.
|
|
221
233
|
*/
|
|
222
|
-
|
|
234
|
+
rightIcon: {
|
|
223
235
|
type: String,
|
|
224
236
|
default: "",
|
|
225
237
|
},
|
|
@@ -340,7 +352,9 @@ const {
|
|
|
340
352
|
labelAttrs,
|
|
341
353
|
passwordIconAttrs,
|
|
342
354
|
leftIconSlotAttrs,
|
|
355
|
+
leftIconAttrs,
|
|
343
356
|
inputWrapperAttrs,
|
|
357
|
+
rightIconAttrs,
|
|
344
358
|
rightIconSlotAttrs,
|
|
345
359
|
hasSlotContent,
|
|
346
360
|
} = useAttrs(props, { isTypePassword, inputPasswordClasses });
|
|
@@ -433,7 +447,7 @@ function transformValue(value, exp) {
|
|
|
433
447
|
|
|
434
448
|
function setLabelPosition() {
|
|
435
449
|
const shouldAlignLabelOnTop =
|
|
436
|
-
!hasSlotContent(slots["icon
|
|
450
|
+
!hasSlotContent(slots["left-icon"]) && !hasSlotContent(slots["left"]) && !props.leftIcon;
|
|
437
451
|
|
|
438
452
|
if (props.labelAlign === "top" || shouldAlignLabelOnTop) {
|
|
439
453
|
return;
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
tag="label"
|
|
48
48
|
variant="thirdary"
|
|
49
49
|
:size="buttonSize"
|
|
50
|
-
:icon
|
|
50
|
+
:right-icon="config.chooseFileIconName"
|
|
51
51
|
:label="currentLocale.uploadFile"
|
|
52
52
|
:disabled="disabled"
|
|
53
53
|
v-bind="chooseFileButtonAttrs"
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
variant="thirdary"
|
|
75
75
|
:size="buttonSize"
|
|
76
76
|
:disabled="disabled"
|
|
77
|
-
:icon
|
|
77
|
+
:left-icon="config.clearIconName"
|
|
78
78
|
v-bind="clearButtonAttrs"
|
|
79
79
|
:data-cy="`${dataCy}-clear`"
|
|
80
80
|
@click="onClickResetFiles"
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
<slot name="left" />
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
|
-
<template #icon
|
|
24
|
+
<template #left-icon>
|
|
25
25
|
<!-- @slot Use it to add icon before the text. -->
|
|
26
|
-
<slot name="icon
|
|
26
|
+
<slot name="left-icon" />
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
|
-
<template #icon
|
|
29
|
+
<template #right-icon>
|
|
30
30
|
<UIcon
|
|
31
31
|
v-if="modelValue"
|
|
32
32
|
internal
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
|
|
42
42
|
<!-- @slot Use it to add icon after the text. -->
|
|
43
43
|
<slot
|
|
44
|
-
name="icon
|
|
44
|
+
name="right-icon"
|
|
45
45
|
:icon-name="config.searchIconName"
|
|
46
46
|
:icon-size="iconSize"
|
|
47
47
|
:search-button-label="searchButtonLabel"
|
|
@@ -66,8 +66,8 @@ export default /*tw*/ {
|
|
|
66
66
|
},
|
|
67
67
|
leftIconWrapper: "pr-3 flex items-center",
|
|
68
68
|
rightIconWrapper: "pl-3 flex items-center",
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
leftIcon: "{UIcon}",
|
|
70
|
+
rightIcon: "{UIcon}",
|
|
71
71
|
beforeCaret: "",
|
|
72
72
|
afterCaret: "mr-3",
|
|
73
73
|
caret: {
|
|
@@ -234,29 +234,29 @@ slotBeforeOption.args = {
|
|
|
234
234
|
`,
|
|
235
235
|
};
|
|
236
236
|
|
|
237
|
-
export const
|
|
238
|
-
|
|
239
|
-
|
|
237
|
+
export const leftIcon = DefaultTemplate.bind({});
|
|
238
|
+
leftIcon.args = {
|
|
239
|
+
leftIcon: "star",
|
|
240
240
|
};
|
|
241
241
|
|
|
242
|
-
export const
|
|
243
|
-
|
|
244
|
-
|
|
242
|
+
export const rightIcon = DefaultTemplate.bind({});
|
|
243
|
+
rightIcon.args = {
|
|
244
|
+
rightIcon: "star",
|
|
245
245
|
};
|
|
246
246
|
|
|
247
|
-
export const
|
|
248
|
-
|
|
247
|
+
export const leftIconSlot = DefaultTemplate.bind({});
|
|
248
|
+
leftIconSlot.args = {
|
|
249
249
|
slotTemplate: `
|
|
250
|
-
<template #icon
|
|
250
|
+
<template #left-icon>
|
|
251
251
|
<UIcon name="star" color="green" />
|
|
252
252
|
</template>
|
|
253
253
|
`,
|
|
254
254
|
};
|
|
255
255
|
|
|
256
|
-
export const
|
|
257
|
-
|
|
256
|
+
export const rightIconSlot = DefaultTemplate.bind({});
|
|
257
|
+
rightIconSlot.args = {
|
|
258
258
|
slotTemplate: `
|
|
259
|
-
<template #icon
|
|
259
|
+
<template #right-icon>
|
|
260
260
|
<UIcon name="star" color="green" />
|
|
261
261
|
</template>
|
|
262
262
|
`,
|
package/ui.form-select/index.vue
CHANGED
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
|
|
77
77
|
<div ref="innerWrapperRef" v-bind="innerWrapperAttrs">
|
|
78
78
|
<span
|
|
79
|
-
v-if="hasSlotContent($slots['icon
|
|
79
|
+
v-if="hasSlotContent($slots['left-icon']) || leftIcon"
|
|
80
80
|
ref="leftSlotWrapperRef"
|
|
81
81
|
v-bind="leftIconWrapperAttrs"
|
|
82
82
|
>
|
|
@@ -85,13 +85,13 @@
|
|
|
85
85
|
@binding {string} icon-name
|
|
86
86
|
@binding {string} icon-size
|
|
87
87
|
-->
|
|
88
|
-
<slot name="icon
|
|
88
|
+
<slot name="left-icon" :icon-name="leftIcon" :icon-size="iconSize">
|
|
89
89
|
<UIcon
|
|
90
|
-
v-if="
|
|
91
|
-
:name="
|
|
90
|
+
v-if="leftIcon"
|
|
91
|
+
:name="leftIcon"
|
|
92
92
|
:size="iconSize"
|
|
93
93
|
internal
|
|
94
|
-
v-bind="
|
|
94
|
+
v-bind="leftIconAttrs"
|
|
95
95
|
/>
|
|
96
96
|
</slot>
|
|
97
97
|
</span>
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
<slot name="right" />
|
|
198
198
|
|
|
199
199
|
<span
|
|
200
|
-
v-if="hasSlotContent($slots['icon
|
|
200
|
+
v-if="hasSlotContent($slots['right-icon']) || rightIcon"
|
|
201
201
|
v-bind="rightIconWrapperAttrs"
|
|
202
202
|
>
|
|
203
203
|
<!--
|
|
@@ -205,13 +205,13 @@
|
|
|
205
205
|
@binding {string} icon-name
|
|
206
206
|
@binding {string} icon-size
|
|
207
207
|
-->
|
|
208
|
-
<slot name="icon
|
|
208
|
+
<slot name="right-icon" :icon-name="rightIcon" :icon-size="iconSize">
|
|
209
209
|
<UIcon
|
|
210
|
-
v-if="
|
|
211
|
-
:name="
|
|
210
|
+
v-if="rightIcon"
|
|
211
|
+
:name="rightIcon"
|
|
212
212
|
:size="iconSize"
|
|
213
213
|
internal
|
|
214
|
-
v-bind="
|
|
214
|
+
v-bind="rightIconAttrs"
|
|
215
215
|
/>
|
|
216
216
|
</slot>
|
|
217
217
|
</span>
|
|
@@ -363,7 +363,7 @@ const props = defineProps({
|
|
|
363
363
|
/**
|
|
364
364
|
* Left side icon name.
|
|
365
365
|
*/
|
|
366
|
-
|
|
366
|
+
leftIcon: {
|
|
367
367
|
type: String,
|
|
368
368
|
default: "",
|
|
369
369
|
},
|
|
@@ -371,7 +371,7 @@ const props = defineProps({
|
|
|
371
371
|
/**
|
|
372
372
|
* Right side icon name.
|
|
373
373
|
*/
|
|
374
|
-
|
|
374
|
+
rightIcon: {
|
|
375
375
|
type: String,
|
|
376
376
|
default: "",
|
|
377
377
|
},
|
|
@@ -583,8 +583,8 @@ const {
|
|
|
583
583
|
innerWrapperAttrs,
|
|
584
584
|
leftIconWrapperAttrs,
|
|
585
585
|
rightIconWrapperAttrs,
|
|
586
|
-
|
|
587
|
-
|
|
586
|
+
leftIconAttrs,
|
|
587
|
+
rightIconAttrs,
|
|
588
588
|
beforeCaretAttrs,
|
|
589
589
|
afterCaretAttrs,
|
|
590
590
|
toggleAttrs,
|
|
@@ -824,7 +824,7 @@ function setLabelPosition() {
|
|
|
824
824
|
if (
|
|
825
825
|
props.labelAlign === "top" ||
|
|
826
826
|
!hasSlotContent(slots["left"]) ||
|
|
827
|
-
(!hasSlotContent(slots["icon
|
|
827
|
+
(!hasSlotContent(slots["left-icon"]) && !props.leftIcon)
|
|
828
828
|
) {
|
|
829
829
|
return;
|
|
830
830
|
}
|
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.283",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
@@ -792,7 +792,7 @@
|
|
|
792
792
|
"default": "md"
|
|
793
793
|
},
|
|
794
794
|
{
|
|
795
|
-
"name": "
|
|
795
|
+
"name": "leftIcon",
|
|
796
796
|
"description": "Left side icon name.",
|
|
797
797
|
"value": {
|
|
798
798
|
"kind": "expression",
|
|
@@ -801,7 +801,7 @@
|
|
|
801
801
|
"default": "\"\""
|
|
802
802
|
},
|
|
803
803
|
{
|
|
804
|
-
"name": "
|
|
804
|
+
"name": "rightIcon",
|
|
805
805
|
"description": "Right side icon name.",
|
|
806
806
|
"value": {
|
|
807
807
|
"kind": "expression",
|
|
@@ -920,7 +920,7 @@
|
|
|
920
920
|
],
|
|
921
921
|
"slots": [
|
|
922
922
|
{
|
|
923
|
-
"name": "icon
|
|
923
|
+
"name": "left-icon",
|
|
924
924
|
"scoped": true,
|
|
925
925
|
"description": "Use it to add icon before the text.",
|
|
926
926
|
"bindings": [
|
|
@@ -951,7 +951,7 @@
|
|
|
951
951
|
"description": "Use it to add something after the text."
|
|
952
952
|
},
|
|
953
953
|
{
|
|
954
|
-
"name": "icon
|
|
954
|
+
"name": "right-icon",
|
|
955
955
|
"scoped": true,
|
|
956
956
|
"description": "Use it to add icon after the text.",
|
|
957
957
|
"bindings": [
|
|
@@ -2438,7 +2438,7 @@
|
|
|
2438
2438
|
"name": "left"
|
|
2439
2439
|
},
|
|
2440
2440
|
{
|
|
2441
|
-
"name": "icon
|
|
2441
|
+
"name": "right-icon"
|
|
2442
2442
|
},
|
|
2443
2443
|
{
|
|
2444
2444
|
"name": "right"
|
|
@@ -4023,7 +4023,7 @@
|
|
|
4023
4023
|
"default": "md"
|
|
4024
4024
|
},
|
|
4025
4025
|
{
|
|
4026
|
-
"name": "
|
|
4026
|
+
"name": "leftIcon",
|
|
4027
4027
|
"description": "Left side icon name.",
|
|
4028
4028
|
"value": {
|
|
4029
4029
|
"kind": "expression",
|
|
@@ -4032,7 +4032,7 @@
|
|
|
4032
4032
|
"default": "\"\""
|
|
4033
4033
|
},
|
|
4034
4034
|
{
|
|
4035
|
-
"name": "
|
|
4035
|
+
"name": "rightIcon",
|
|
4036
4036
|
"description": "Right side icon name.",
|
|
4037
4037
|
"value": {
|
|
4038
4038
|
"kind": "expression",
|
|
@@ -4189,7 +4189,7 @@
|
|
|
4189
4189
|
"description": "Use it to add something before the text."
|
|
4190
4190
|
},
|
|
4191
4191
|
{
|
|
4192
|
-
"name": "icon
|
|
4192
|
+
"name": "left-icon",
|
|
4193
4193
|
"scoped": true,
|
|
4194
4194
|
"description": "Use it to add icon before the text.",
|
|
4195
4195
|
"bindings": [
|
|
@@ -4204,7 +4204,7 @@
|
|
|
4204
4204
|
]
|
|
4205
4205
|
},
|
|
4206
4206
|
{
|
|
4207
|
-
"name": "icon
|
|
4207
|
+
"name": "right-icon",
|
|
4208
4208
|
"scoped": true,
|
|
4209
4209
|
"description": "Use it to add icon after the text.",
|
|
4210
4210
|
"bindings": [
|
|
@@ -5029,11 +5029,11 @@
|
|
|
5029
5029
|
"description": "Use it to add something before the text."
|
|
5030
5030
|
},
|
|
5031
5031
|
{
|
|
5032
|
-
"name": "icon
|
|
5032
|
+
"name": "left-icon",
|
|
5033
5033
|
"description": "Use it to add icon before the text."
|
|
5034
5034
|
},
|
|
5035
5035
|
{
|
|
5036
|
-
"name": "icon
|
|
5036
|
+
"name": "right-icon",
|
|
5037
5037
|
"scoped": true,
|
|
5038
5038
|
"description": "Use it to add icon after the text.",
|
|
5039
5039
|
"bindings": [
|
|
@@ -6931,7 +6931,7 @@
|
|
|
6931
6931
|
"default": "md"
|
|
6932
6932
|
},
|
|
6933
6933
|
{
|
|
6934
|
-
"name": "
|
|
6934
|
+
"name": "leftIcon",
|
|
6935
6935
|
"description": "Left side icon name.",
|
|
6936
6936
|
"value": {
|
|
6937
6937
|
"kind": "expression",
|
|
@@ -6940,7 +6940,7 @@
|
|
|
6940
6940
|
"default": "\"\""
|
|
6941
6941
|
},
|
|
6942
6942
|
{
|
|
6943
|
-
"name": "
|
|
6943
|
+
"name": "rightIcon",
|
|
6944
6944
|
"description": "Right side icon name.",
|
|
6945
6945
|
"value": {
|
|
6946
6946
|
"kind": "expression",
|
|
@@ -7176,7 +7176,7 @@
|
|
|
7176
7176
|
]
|
|
7177
7177
|
},
|
|
7178
7178
|
{
|
|
7179
|
-
"name": "icon
|
|
7179
|
+
"name": "left-icon",
|
|
7180
7180
|
"scoped": true,
|
|
7181
7181
|
"description": "Use it to add icon before option.",
|
|
7182
7182
|
"bindings": [
|
|
@@ -7225,7 +7225,7 @@
|
|
|
7225
7225
|
"description": "Use it to add something after input."
|
|
7226
7226
|
},
|
|
7227
7227
|
{
|
|
7228
|
-
"name": "icon
|
|
7228
|
+
"name": "right-icon",
|
|
7229
7229
|
"scoped": true,
|
|
7230
7230
|
"description": "Use it to add icon after option.",
|
|
7231
7231
|
"bindings": [
|