@milaboratories/uikit 2.2.32 → 2.2.33

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/uikit",
3
- "version": "2.2.32",
3
+ "version": "2.2.33",
4
4
  "type": "module",
5
5
  "main": "dist/pl-uikit.umd.js",
6
6
  "module": "dist/pl-uikit.js",
@@ -33,8 +33,8 @@
33
33
  "yarpm": "^1.2.0",
34
34
  "svgo": "^3.3.2",
35
35
  "@milaboratories/eslint-config": "^1.0.0",
36
- "@milaboratories/helpers": "^1.6.9",
37
- "@platforma-sdk/model": "^1.18.0"
36
+ "@milaboratories/helpers": "^1.6.10",
37
+ "@platforma-sdk/model": "^1.20.0"
38
38
  },
39
39
  "scripts": {
40
40
  "dev": "vite",
@@ -41,7 +41,6 @@ function mouseoutHandler() {
41
41
 
42
42
  <style lang="scss">
43
43
  .ui-lt-container {
44
- outline: 1px solid red;
45
44
  min-width: 0;
46
45
  white-space: nowrap;
47
46
  overflow: hidden;
@@ -9,6 +9,8 @@
9
9
  outline: none;
10
10
  border-radius: 4px;
11
11
  @include icon(var(--base-icon), 24px);
12
+ min-width: 24px;
13
+ min-height: 24px;
12
14
 
13
15
  &.checked {
14
16
  @include icon(var(--checked-icon), 24px);
@@ -321,8 +321,8 @@ watchPostEffect(() => {
321
321
  @focus="onInputFocus"
322
322
  />
323
323
 
324
- <div v-if="!data.open" @click="setFocusOnInput">
325
- <LongText class="input-value"> {{ textValue }} </LongText>
324
+ <div v-if="!data.open" class="input-value" @click="setFocusOnInput">
325
+ <LongText> {{ textValue }} </LongText>
326
326
  </div>
327
327
 
328
328
  <div class="pl-dropdown__controls">
@@ -121,26 +121,30 @@
121
121
  display: flex;
122
122
  flex-direction: row;
123
123
  align-items: center;
124
+ cursor: pointer;
124
125
 
125
126
  .input-value {
126
- outline: 1px solid red;
127
127
  position: absolute;
128
128
  top: 0;
129
129
  left: 0;
130
130
  bottom: 0;
131
131
  right: 0;
132
+ display: flex;
133
+ flex-direction: row;
134
+ align-items: center;
132
135
  padding: 0 60px 0 11px; // @TODO padding-right based on controls width
133
136
  pointer-events: none;
134
- line-height: var(--control-height);
137
+ line-height: 20px;
135
138
  color: var(--txt-01);
136
139
  overflow: hidden;
137
140
  white-space: pre;
138
141
  text-overflow: ellipsis;
142
+ cursor: inherit;
139
143
  }
140
144
 
141
145
  input {
142
146
  min-height: calc(var(--control-height) - 2px);
143
- line-height: calc(var(--control-height) - 2px);
147
+ line-height: 20px;
144
148
  font-family: inherit;
145
149
  font-size: inherit;
146
150
  background-color: transparent;
@@ -218,17 +218,17 @@ watchPostEffect(() => {
218
218
  </script>
219
219
 
220
220
  <template>
221
- <div class="pl-multi-dropdown__envelope">
221
+ <div class="pl-dropdown-multi__envelope">
222
222
  <div
223
223
  ref="rootRef"
224
224
  :tabindex="tabindex"
225
- class="pl-multi-dropdown"
225
+ class="pl-dropdown-multi"
226
226
  :class="{ open: data.open, error, disabled }"
227
227
  @keydown="handleKeydown"
228
228
  @focusout="onFocusOut"
229
229
  >
230
- <div class="pl-multi-dropdown__container">
231
- <div class="pl-multi-dropdown__field">
230
+ <div class="pl-dropdown-multi__container">
231
+ <div class="pl-dropdown-multi__field">
232
232
  <input
233
233
  ref="input"
234
234
  v-model="data.search"
@@ -246,7 +246,7 @@ watchPostEffect(() => {
246
246
  </PlChip>
247
247
  </div>
248
248
  <div class="arrow" @click.stop="toggleModel" />
249
- <div class="pl-multi-dropdown__append">
249
+ <div class="pl-dropdown-multi__append">
250
250
  <slot name="append" />
251
251
  </div>
252
252
  </div>
@@ -263,12 +263,12 @@ watchPostEffect(() => {
263
263
  v-if="data.open"
264
264
  ref="overlay"
265
265
  :root="rootRef"
266
- class="pl-multi-dropdown__options"
267
- :gap="3"
266
+ class="pl-dropdown-multi__options"
267
+ :gap="5"
268
268
  tabindex="-1"
269
269
  @focusout="onFocusOut"
270
270
  >
271
- <div class="pl-multi-dropdown__open-chips-container">
271
+ <div class="pl-dropdown-multi__open-chips-container">
272
272
  <PlChip v-for="(opt, i) in selectedOptionsRef" :key="i" closeable small @close="unselectOption(opt.value)">
273
273
  {{ opt.label || opt.value }}
274
274
  </PlChip>
@@ -286,10 +286,10 @@ watchPostEffect(() => {
286
286
  />
287
287
  <div v-if="!filteredOptionsRef.length" class="nothing-found">Nothing found</div>
288
288
  </DropdownOverlay>
289
- <DoubleContour class="pl-multi-dropdown__contour" />
289
+ <DoubleContour class="pl-dropdown-multi__contour" />
290
290
  </div>
291
291
  </div>
292
- <div v-if="error" class="pl-multi-dropdown__error">{{ error }}</div>
293
- <div v-else-if="helper" class="pl-multi-dropdown__helper">{{ helper }}</div>
292
+ <div v-if="error" class="pl-dropdown-multi__error">{{ error }}</div>
293
+ <div v-else-if="helper" class="pl-dropdown-multi__helper">{{ helper }}</div>
294
294
  </div>
295
295
  </template>
@@ -1,6 +1,6 @@
1
1
  @import "@/assets/mixins";
2
2
 
3
- .pl-multi-dropdown {
3
+ .pl-dropdown-multi {
4
4
  $root: &;
5
5
 
6
6
  --contour-color: var(--txt-01);
@@ -66,7 +66,7 @@
66
66
  .nothing-found {
67
67
  padding: 0 10px;
68
68
  height: var(--control-height);
69
- line-height: var(--control-height);
69
+ line-height: 20px;
70
70
  background-color: #fff;
71
71
  opacity: 0.5;
72
72
  font-style: italic;
@@ -76,7 +76,7 @@
76
76
  position: relative;
77
77
  padding: 0 10px;
78
78
  height: var(--control-height);
79
- line-height: var(--control-height);
79
+ line-height: 20px;
80
80
  cursor: pointer;
81
81
  user-select: none;
82
82
  display: flex;
@@ -86,7 +86,7 @@
86
86
  --base-icon: url('@/assets/images/24_checkbox-base.svg');
87
87
  --checked-icon: url('@/assets/images/24_checkbox-checked.svg');
88
88
 
89
- .pl-multi-dropdown__checkmark {
89
+ .pl-dropdown-multi__checkmark {
90
90
  cursor: pointer;
91
91
  outline: none;
92
92
  border-radius: 4px;
@@ -109,7 +109,7 @@
109
109
  &.selected {
110
110
  background-color: var(--color-active-select);
111
111
 
112
- .pl-multi-dropdown__checkmark {
112
+ .pl-dropdown-multi__checkmark {
113
113
  @include icon(var(--checked-icon), 24px);
114
114
  }
115
115
  }
@@ -132,7 +132,8 @@
132
132
  padding: 0 11px;
133
133
 
134
134
  min-height: var(--control-height);
135
- line-height: var(--control-height);
135
+ line-height: 20px;
136
+ cursor: pointer;
136
137
 
137
138
  display: flex;
138
139
  flex-direction: row;
@@ -146,7 +147,7 @@
146
147
  right: 30px;
147
148
  overflow: hidden;
148
149
  padding: 0 11px;
149
- line-height: var(--control-height);
150
+ line-height: 20px;
150
151
  color: var(--contour-color);
151
152
  display: flex;
152
153
  gap: 8px;
@@ -155,7 +156,7 @@
155
156
 
156
157
  input {
157
158
  min-height: calc(var(--control-height) - 2px);
158
- line-height: calc(var(--control-height) - 2px);
159
+ line-height: 20px;
159
160
  font-family: inherit;
160
161
  font-size: inherit;
161
162
  background-color: transparent;
@@ -51,7 +51,7 @@ const clear = () => emit('update:modelValue', '');
51
51
  line-height: calc(var(--control-height) - 2px);
52
52
  background-color: var(--pl-search-field-bg);
53
53
  padding: 0 0 0 0;
54
- border-bottom: 2px solid var(--pl-search-field-border-bottom-color);
54
+ border-bottom: 1px solid var(--pl-search-field-border-bottom-color);
55
55
 
56
56
  input {
57
57
  margin-left: 8px;
@@ -77,7 +77,7 @@ const props = defineProps<{
77
77
  /**
78
78
  * The string specifies whether the field should be a password or not, value could be "password" or undefined.
79
79
  */
80
- type?: 'password' | 'number';
80
+ type?: 'password';
81
81
  }>();
82
82
 
83
83
  const rootRef = ref<HTMLInputElement | undefined>(undefined);
@@ -168,6 +168,8 @@ const onFocusOut = () => {
168
168
  data.cached = undefined;
169
169
  };
170
170
 
171
+ const setFocusOnInput = () => inputRef.value?.focus();
172
+
171
173
  useLabelNotch(rootRef);
172
174
  </script>
173
175
 
@@ -204,9 +206,9 @@ useLabelNotch(rootRef);
204
206
  spellcheck="false"
205
207
  @focusout="onFocusOut"
206
208
  />
207
- <div class="pl-text-field__append">
208
- <PlIcon16 v-if="canShowClearable" class="pl-text-field__clearable" name="delete-clear" @click="clear" />
209
- <PlMaskIcon24 v-if="type === 'password'" :name="passwordIcon" style="cursor: pointer" @click="togglePasswordVisibility" />
209
+ <div class="pl-text-field__append" @click="setFocusOnInput">
210
+ <PlIcon16 v-if="canShowClearable" class="pl-text-field__clearable" name="delete-clear" @click.stop="clear" />
211
+ <PlMaskIcon24 v-if="type === 'password'" :name="passwordIcon" style="cursor: pointer" @click.stop="togglePasswordVisibility" />
210
212
  <slot name="append" />
211
213
  </div>
212
214
  <DoubleContour class="pl-text-field__contour" />
@@ -31,7 +31,7 @@
31
31
  font-family: var(--font-family-base);
32
32
  font-weight: 500;
33
33
  min-height: calc(var(--control-height) - 2px);
34
- line-height: calc(var(--control-height) - 2px);
34
+ line-height: 20px;
35
35
  width: 100%;
36
36
  padding: 0 12px;
37
37
  border: none;
@@ -82,6 +82,7 @@
82
82
  flex-direction: row;
83
83
  align-items: center;
84
84
  gap: 4px;
85
+ cursor: text;
85
86
  .icon-16 {
86
87
  cursor: pointer;
87
88
  }