its_ui_vite 1.1.2 → 1.1.3
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
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div
|
|
3
3
|
ref="root"
|
|
4
4
|
:data-c-datepicker-id="datePickerId"
|
|
5
|
-
class="c-datepicker"
|
|
5
|
+
:class="['c-datepicker', color]"
|
|
6
6
|
:style="`--transition: ${transition}ms; --width: ${width}; --picker-content-indent-y: ${pickerContentIndentY}px`"
|
|
7
7
|
>
|
|
8
8
|
<div
|
|
@@ -211,6 +211,7 @@ import { computed, ref, watch, onMounted, onUnmounted, Teleport } from 'vue';
|
|
|
211
211
|
type TProps = {
|
|
212
212
|
date?: string,
|
|
213
213
|
showTime: boolean,
|
|
214
|
+
color?: 'green' | 'green2',
|
|
214
215
|
locale?: 'rus' | 'usa' | 'tur' | 'spa',
|
|
215
216
|
max?: string,
|
|
216
217
|
min?: string,
|
|
@@ -222,6 +223,7 @@ type TProps = {
|
|
|
222
223
|
|
|
223
224
|
const props = withDefaults(defineProps<TProps>(), {
|
|
224
225
|
locale: 'rus',
|
|
226
|
+
color: 'green',
|
|
225
227
|
showTime: true,
|
|
226
228
|
isOpen: false,
|
|
227
229
|
width: '100%',
|
|
@@ -751,6 +753,32 @@ $timeWidth: 54px;
|
|
|
751
753
|
|
|
752
754
|
gap: 15px;
|
|
753
755
|
|
|
756
|
+
// prop.color
|
|
757
|
+
&.green2 {
|
|
758
|
+
.c-input {
|
|
759
|
+
border-color: var(--green-dark);
|
|
760
|
+
|
|
761
|
+
background: var(--green-low);
|
|
762
|
+
color: var(--white);
|
|
763
|
+
|
|
764
|
+
&::placeholder {
|
|
765
|
+
color: var(--green-medium);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
.c-datepicker__time_wrap {
|
|
770
|
+
border-color: var(--green-dark);
|
|
771
|
+
|
|
772
|
+
background: var(--green-low);
|
|
773
|
+
|
|
774
|
+
span,
|
|
775
|
+
input {
|
|
776
|
+
color: var(--green-medium);
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
// ./prop.color
|
|
781
|
+
|
|
754
782
|
&__inp {
|
|
755
783
|
|
|
756
784
|
.c-input {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
ref="root"
|
|
4
4
|
:data-c-input2-select-id="CInput2SelectId"
|
|
5
5
|
:style="`--transition: ${transition}ms; --width: ${width}; --list-indent-y: ${listIndentY}px`"
|
|
6
|
-
:class="[classes.root, variant, size, { disabled, open: isOpen }]"
|
|
6
|
+
:class="[classes.root, variant, color, size, { disabled, open: isOpen }]"
|
|
7
7
|
>
|
|
8
8
|
<CInput
|
|
9
9
|
:placeholder="activePlaceholder"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
:width="width"
|
|
13
13
|
:iconPosition="iconInfo.position.value"
|
|
14
14
|
v-model.trim="findValue"
|
|
15
|
-
:class="[classes.input, {open: isOpen}]"
|
|
15
|
+
:class="[classes.input, {open: isOpen}, { 'have-value': activeOptions.size > 0 }]"
|
|
16
16
|
>
|
|
17
17
|
<template #customIcon>
|
|
18
18
|
<div class="c-input2-select__inp_icon-content">
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<CIcon
|
|
26
26
|
:class="['c-input2-select__inp_icon', 'c-input2-select__inp_icon-clear', { visible: activeOptions.size > 0 }]"
|
|
27
27
|
:size="24"
|
|
28
|
-
:name="
|
|
28
|
+
:name="iconInfo.clearable.value"
|
|
29
29
|
|
|
30
30
|
@click.stop="clear"
|
|
31
31
|
/>
|
|
@@ -114,11 +114,13 @@ type TProps = {
|
|
|
114
114
|
options?: TOption[],
|
|
115
115
|
variant?: 'default' | 'multiple',
|
|
116
116
|
size?: 'lg' | 'md' | 'sm',
|
|
117
|
+
color?: 'green' | 'green2',
|
|
117
118
|
selectAll?: boolean,
|
|
118
119
|
autocomplete?: boolean,
|
|
119
120
|
disabled?: boolean,
|
|
120
121
|
transformVal?: boolean,
|
|
121
122
|
iconPosition?: Array<'left' | 'right'>,
|
|
123
|
+
clearable?: keyof TIcon,
|
|
122
124
|
iconName?: keyof TIcon,
|
|
123
125
|
isOpen?: boolean,
|
|
124
126
|
locale?: 'rus' | 'usa' | 'tur' | 'spa',
|
|
@@ -131,6 +133,7 @@ const props = withDefaults(defineProps<TProps>(), {
|
|
|
131
133
|
options: () => [],
|
|
132
134
|
variant: 'default',
|
|
133
135
|
size: 'lg',
|
|
136
|
+
color: 'green',
|
|
134
137
|
selectAll: false,
|
|
135
138
|
autocomplete: false,
|
|
136
139
|
disabled: false,
|
|
@@ -227,7 +230,16 @@ const iconInfo = {
|
|
|
227
230
|
const defaultIcon = {'Dropdown': true}
|
|
228
231
|
|
|
229
232
|
return props.iconName ? propIcon : defaultIcon;
|
|
230
|
-
})
|
|
233
|
+
}),
|
|
234
|
+
|
|
235
|
+
clearable: computed(() => {
|
|
236
|
+
const strIconName = String(props?.clearable)
|
|
237
|
+
const propIcon = {[strIconName]: true}
|
|
238
|
+
|
|
239
|
+
const defaultIcon = {'Cross': true}
|
|
240
|
+
|
|
241
|
+
return props.clearable ? propIcon : defaultIcon;
|
|
242
|
+
}),
|
|
231
243
|
}
|
|
232
244
|
|
|
233
245
|
const foundOptions = computed(() => {
|
|
@@ -646,6 +658,21 @@ defineExpose({
|
|
|
646
658
|
}
|
|
647
659
|
// ./prop.size
|
|
648
660
|
|
|
661
|
+
// prop.color
|
|
662
|
+
&.green2 {
|
|
663
|
+
.c-input {
|
|
664
|
+
border-color: var(--green-dark);
|
|
665
|
+
|
|
666
|
+
background: var(--green-low);
|
|
667
|
+
color: var(--white);
|
|
668
|
+
|
|
669
|
+
&::placeholder {
|
|
670
|
+
color: var(--green-medium);
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
// ./prop.color
|
|
675
|
+
|
|
649
676
|
// prop.disabled
|
|
650
677
|
&.disabled {
|
|
651
678
|
opacity: 0.6;
|
|
@@ -673,6 +700,10 @@ defineExpose({
|
|
|
673
700
|
|
|
674
701
|
order: -1;
|
|
675
702
|
}
|
|
703
|
+
|
|
704
|
+
&.have-value .c-input::placeholder {
|
|
705
|
+
color: var(--white);
|
|
706
|
+
}
|
|
676
707
|
}
|
|
677
708
|
|
|
678
709
|
&_count {
|
package/src/pages/index.vue
CHANGED
|
@@ -830,7 +830,7 @@
|
|
|
830
830
|
<!-- col -->
|
|
831
831
|
<div class="table__col checkboxes">
|
|
832
832
|
<div class="table__item">
|
|
833
|
-
<CDatepicker date="2026-02-06T00:00:00.000+03:00" @change_cdatepicker="(e) => console.log(e)" />
|
|
833
|
+
<CDatepicker date="2026-02-06T00:00:00.000+03:00" color="green2" @change_cdatepicker="(e) => console.log(e)" />
|
|
834
834
|
</div>
|
|
835
835
|
<div class="table__item">
|
|
836
836
|
<CDatepicker date="2026-02-06T23:59:59.999+03:00" @change_cdatepicker="(e) => console.log(e)" />
|
|
@@ -1144,6 +1144,7 @@
|
|
|
1144
1144
|
<CInput2Select
|
|
1145
1145
|
:options="optionGroup"
|
|
1146
1146
|
v-model="VModelOption3"
|
|
1147
|
+
color="green2"
|
|
1147
1148
|
:autocomplete="true"
|
|
1148
1149
|
@change_cinput2select="(evt) => log(['CInput2Select default', evt])"
|
|
1149
1150
|
/>
|