bfg-common 1.5.707 → 1.5.709

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.
@@ -1,200 +1,200 @@
1
- <template>
2
- <div :class="['language-dropdown', props.size]">
3
- <ui-select
4
- v-model="selectedLang"
5
- :items="itemsLocal"
6
- :disabled="props.disabled"
7
- :size="props.size"
8
- width="max-content"
9
- max-height="inherit"
10
- test-id="select-language"
11
- arrow-stroke-width="2.4"
12
- >
13
- <template #toggleContent>
14
- <span class="language-dropdown__icon content-icon"
15
- ><ui-icon
16
- :name="selectedLang?.iconName"
17
- :height="props.size === 'sm' ? '16' : '13'"
18
- :width="props.size === 'sm' ? '24' : '19'"
19
- ></ui-icon
20
- ></span>
21
- <span class="ui-selected-text text-ellipsis">{{
22
- selectedLang?.text
23
- }}</span>
24
- </template>
25
- <template #row="{ item }">
26
- <span class="language-dropdown__icon dropdown-icon">
27
- <ui-icon
28
- :name="item.iconName"
29
- :height="props.size === 'sm' ? '16' : '13'"
30
- :width="props.size === 'sm' ? '24' : '19'"
31
- ></ui-icon>
32
- </span>
33
- <span class="ui-item-text">{{ item.text }}</span>
34
- </template>
35
- </ui-select>
36
- </div>
37
- </template>
38
-
39
- <script lang="ts" setup>
40
- import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
41
- // import { findInLocals } from '~/components/common/selectLanguage/lib/utils/utils'
42
-
43
- const props = withDefaults(
44
- defineProps<{
45
- normalizeLang: UI_I_Dropdown[]
46
- modelValue: UI_I_Dropdown
47
- disabled?: boolean
48
- width?: string
49
- size?: 'sm' | 'xs'
50
- }>(),
51
- {
52
- disabled: false,
53
- width: '114px',
54
- size: 'xs',
55
- }
56
- )
57
-
58
- const emits = defineEmits<{
59
- (event: 'update:model-value', newValue: UI_I_Dropdown): void
60
- }>()
61
-
62
- const selectedLang = computed<UI_I_Dropdown>({
63
- get() {
64
- return props.modelValue
65
- },
66
- set(newValue: UI_I_Dropdown) {
67
- emits('update:model-value', newValue)
68
- },
69
- })
70
-
71
- const itemsLocal = computed(() => {
72
- return props.normalizeLang.filter((lang) => !lang.disabled)
73
- })
74
- </script>
75
-
76
- <style lang="scss" scoped>
77
- .language-dropdown {
78
- &.xs {
79
- .language-dropdown__icon {
80
- margin-right: 8px;
81
- &.content-icon {
82
- margin-right: 6px;
83
- }
84
- }
85
-
86
- :deep(.ui-select-container.xs) {
87
- .ui-select-toggle-button {
88
- padding: 6px 8px 6px 10px;
89
-
90
- .ui-selected-text {
91
- font-size: 13px;
92
- line-height: 16px;
93
- font-weight: 500;
94
- }
95
-
96
- height: 28px;
97
- border-radius: 6px;
98
- }
99
-
100
- &.disabled .ui-select-toggle-button .ui-selected-text {
101
- color: var(--select-disabled-text);
102
- }
103
-
104
- .ui-select-fieldset {
105
- border-radius: 6px;
106
- }
107
-
108
- .ui-dropdown.xs .ui-dropdown-menu-item {
109
- height: 28px;
110
- padding: 0 6px !important;
111
- }
112
-
113
- .ui-arrow-icon {
114
- width: 14px;
115
- height: 14px;
116
-
117
- svg {
118
- width: 14px;
119
- height: 14px;
120
- }
121
- }
122
- }
123
-
124
- font-size: 13px;
125
- line-height: 16px;
126
- font-weight: 500;
127
- }
128
-
129
- &.sm {
130
- .language-dropdown__icon {
131
- margin-right: 8px;
132
- &.content-icon {
133
- margin-right: 8px;
134
- }
135
- }
136
-
137
- :deep(.ui-select-container.sm) {
138
- .ui-select-toggle-button {
139
- padding: 8px 8px 8px 10px;
140
- .ui-selected-text {
141
- font-size: 14px;
142
- line-height: 16px;
143
- font-weight: 500;
144
- }
145
- height: 32px;
146
- }
147
-
148
- .ui-arrow-icon {
149
- width: 16px;
150
- height: 16px;
151
-
152
- svg {
153
- width: 16px;
154
- height: 16px;
155
- }
156
- }
157
-
158
- .ui-dropdown-menu.md .ui-dropdown-menu-item .ui-item-text {
159
- font-size: 14px;
160
- }
161
- }
162
-
163
- font-size: 14px;
164
- line-height: 16px;
165
- font-weight: 500;
166
- }
167
-
168
- :deep(.ui-dropdown-menu-item) {
169
- display: flex;
170
- align-items: center;
171
- border-radius: 4px;
172
-
173
- &:not(:last-child) {
174
- margin-bottom: 8px;
175
- }
176
- &:not(.disabled):not(.selected):hover {
177
- background-color: var(--dropdown-item-hover-bg-color);
178
-
179
- .ui-item-text {
180
- color: var(--dropdown-item-hover-color);
181
- }
182
- }
183
-
184
- & .ui-item-text {
185
- color: var(--dropdown-item-color);
186
- font-weight: 500;
187
- }
188
-
189
- &.selected {
190
- .ui-item-text {
191
- color: var(--dropdown-item-selected-color);
192
- }
193
- }
194
- }
195
-
196
- &__icon {
197
- display: flex;
198
- }
199
- }
200
- </style>
1
+ <template>
2
+ <div :class="['language-dropdown', props.size]">
3
+ <ui-select
4
+ v-model="selectedLang"
5
+ :items="itemsLocal"
6
+ :disabled="props.disabled"
7
+ :size="props.size"
8
+ width="max-content"
9
+ max-height="inherit"
10
+ test-id="select-language"
11
+ arrow-stroke-width="2.4"
12
+ >
13
+ <template #toggleContent>
14
+ <span class="language-dropdown__icon content-icon">
15
+ <ui-icon
16
+ :name="selectedLang?.iconName"
17
+ :height="props.size === 'sm' ? '16' : '13'"
18
+ :width="props.size === 'sm' ? '24' : '19'"
19
+ />
20
+ </span>
21
+ <span class="ui-selected-text text-ellipsis">{{
22
+ selectedLang?.text
23
+ }}</span>
24
+ </template>
25
+ <template #row="{ item }">
26
+ <span class="language-dropdown__icon dropdown-icon">
27
+ <ui-icon
28
+ :name="item.iconName"
29
+ :height="props.size === 'sm' ? '16' : '13'"
30
+ :width="props.size === 'sm' ? '24' : '19'"
31
+ />
32
+ </span>
33
+ <span class="ui-item-text">{{ item.text }}</span>
34
+ </template>
35
+ </ui-select>
36
+ </div>
37
+ </template>
38
+
39
+ <script lang="ts" setup>
40
+ import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
41
+ // import { findInLocals } from '~/components/common/selectLanguage/lib/utils/utils'
42
+
43
+ const props = withDefaults(
44
+ defineProps<{
45
+ normalizeLang: UI_I_Dropdown[]
46
+ modelValue: UI_I_Dropdown
47
+ disabled?: boolean
48
+ width?: string
49
+ size?: 'sm' | 'xs'
50
+ }>(),
51
+ {
52
+ disabled: false,
53
+ width: '114px',
54
+ size: 'xs',
55
+ }
56
+ )
57
+
58
+ const emits = defineEmits<{
59
+ (event: 'update:model-value', newValue: UI_I_Dropdown): void
60
+ }>()
61
+
62
+ const selectedLang = computed<UI_I_Dropdown>({
63
+ get() {
64
+ return props.modelValue
65
+ },
66
+ set(newValue: UI_I_Dropdown) {
67
+ emits('update:model-value', newValue)
68
+ },
69
+ })
70
+
71
+ const itemsLocal = computed(() => {
72
+ return props.normalizeLang.filter((lang) => !lang.disabled)
73
+ })
74
+ </script>
75
+
76
+ <style lang="scss" scoped>
77
+ .language-dropdown {
78
+ &.xs {
79
+ .language-dropdown__icon {
80
+ margin-right: 8px;
81
+ &.content-icon {
82
+ margin-right: 6px;
83
+ }
84
+ }
85
+
86
+ :deep(.ui-select-container.xs) {
87
+ .ui-select-toggle-button {
88
+ padding: 6px 8px 6px 10px;
89
+
90
+ .ui-selected-text {
91
+ font-size: 13px;
92
+ line-height: 16px;
93
+ font-weight: 500;
94
+ }
95
+
96
+ height: 28px;
97
+ border-radius: 6px;
98
+ }
99
+
100
+ &.disabled .ui-select-toggle-button .ui-selected-text {
101
+ color: var(--select-disabled-text);
102
+ }
103
+
104
+ .ui-select-fieldset {
105
+ border-radius: 6px;
106
+ }
107
+
108
+ .ui-dropdown.xs .ui-dropdown-menu-item {
109
+ height: 28px;
110
+ padding: 0 6px !important;
111
+ }
112
+
113
+ .ui-arrow-icon {
114
+ width: 14px;
115
+ height: 14px;
116
+
117
+ svg {
118
+ width: 14px;
119
+ height: 14px;
120
+ }
121
+ }
122
+ }
123
+
124
+ font-size: 13px;
125
+ line-height: 16px;
126
+ font-weight: 500;
127
+ }
128
+
129
+ &.sm {
130
+ .language-dropdown__icon {
131
+ margin-right: 8px;
132
+ &.content-icon {
133
+ margin-right: 8px;
134
+ }
135
+ }
136
+
137
+ :deep(.ui-select-container.sm) {
138
+ .ui-select-toggle-button {
139
+ padding: 8px 8px 8px 10px;
140
+ .ui-selected-text {
141
+ font-size: 14px;
142
+ line-height: 16px;
143
+ font-weight: 500;
144
+ }
145
+ height: 32px;
146
+ }
147
+
148
+ .ui-arrow-icon {
149
+ width: 16px;
150
+ height: 16px;
151
+
152
+ svg {
153
+ width: 16px;
154
+ height: 16px;
155
+ }
156
+ }
157
+
158
+ .ui-dropdown-menu.md .ui-dropdown-menu-item .ui-item-text {
159
+ font-size: 14px;
160
+ }
161
+ }
162
+
163
+ font-size: 14px;
164
+ line-height: 16px;
165
+ font-weight: 500;
166
+ }
167
+
168
+ :deep(.ui-dropdown-menu-item) {
169
+ display: flex;
170
+ align-items: center;
171
+ border-radius: 4px;
172
+
173
+ &:not(:last-child) {
174
+ margin-bottom: 8px;
175
+ }
176
+ &:not(.disabled):not(.selected):hover {
177
+ background-color: var(--dropdown-item-hover-bg-color);
178
+
179
+ .ui-item-text {
180
+ color: var(--dropdown-item-hover-color);
181
+ }
182
+ }
183
+
184
+ & .ui-item-text {
185
+ color: var(--dropdown-item-color);
186
+ font-weight: 500;
187
+ }
188
+
189
+ &.selected {
190
+ .ui-item-text {
191
+ color: var(--dropdown-item-selected-color);
192
+ }
193
+ }
194
+ }
195
+
196
+ &__icon {
197
+ display: flex;
198
+ }
199
+ }
200
+ </style>
@@ -59,9 +59,9 @@ const socketOptions = computed<number[]>(() => {
59
59
  watch(
60
60
  socketOptions,
61
61
  () => {
62
- !socketOptions.value.includes(selectedCorePerSocketLocal.value) &&
63
- !props.disabled &&
64
- (selectedCorePerSocketLocal.value = 1)
62
+ // !socketOptions.value.includes(selectedCorePerSocketLocal.value) &&
63
+ !props.disabled &&
64
+ (selectedCorePerSocketLocal.value = socketOptions.value.at(-1) || 1)
65
65
  },
66
66
  { deep: true }
67
67
  )
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.707",
4
+ "version": "1.5.709",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",