Skip to content

Commit d2eee80

Browse files
author
Igor Biryukov
committed
Fixed build errors and numerous sass compiler warnings
1 parent 2f5e0ab commit d2eee80

File tree

31 files changed

+68
-47
lines changed

31 files changed

+68
-47
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@vitejs/plugin-vue": "^4.4.0",
4949
"sass": "^1.69.5",
5050
"typescript": "^5.2.2",
51-
"vite": "^4.5.0",
51+
"vite": "^7.2.4",
5252
"vite-plugin-css-injected-by-js": "^3.3.0",
5353
"vue-tsc": "^2.0.29"
5454
},

src/WidgetWrapper.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ defineProps<{
1717

1818
<style scoped lang="scss">
1919
20-
@import "@/assets/variables";
20+
@use "@/assets/variables" as *;
2121
2222
.wrapper {
2323
display: flex;

src/assets/mixins.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use "sass:list";
12
// Breakpoints
23
@mixin respond-to($breakpoint, $direction) {
34
@if $direction == max {
@@ -20,7 +21,7 @@
2021
$transition: ();
2122

2223
@each $property in $properties {
23-
$transition: append(
24+
$transition: list.append(
2425
$transition,
2526
($property 0.15s linear),
2627
$separator: comma

src/common/helpers/parseStyles.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
export function parseStyles(input?: Record<string, string> | string): Record<string, string> {
2+
const result: Record<string, string> = {};
3+
if (!input) return result;
4+
5+
if (typeof input !== 'string') return input;
6+
7+
const declarations = input.split(';');
8+
9+
for (const declaration of declarations) {
10+
const colonIndex = declaration.indexOf(':');
11+
if (colonIndex !== -1) {
12+
const property = declaration.substring(0, colonIndex).trim();
13+
const value = declaration.substring(colonIndex + 1).trim();
14+
15+
if (property && value) {
16+
const camelCaseProperty = property.replace(/-([a-z])/g, (_, letter) => letter.toUpperCase());
17+
result[camelCaseProperty] = value;
18+
}
19+
}
20+
}
21+
22+
return result;
23+
}

src/common/types/props.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ export interface CommonProps {
44
id?: string;
55
attrs?: object;
66
classes?: StyleValue;
7-
style?: Record<string, string>;
7+
style?: Record<string, string> | string;
88
}

src/components/hive-autocomplete/hive-autocomplete.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ const updateCurrentValueAutocomplteHandler = (value: Value | undefined) => {
164164
</template>
165165

166166
<style scoped lang="scss">
167-
@import '@/assets/variables.scss';
167+
@use '@/assets/variables.scss' as *;
168168
169169
$drop-down-z_menu: 1;
170170
$border-width: 1px;

src/components/hive-badge/hive-badge.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const isFlashing = computed(() => {
3939
</template>
4040

4141
<style scoped lang="scss">
42-
@import '@/assets/variables.scss';
42+
@use '@/assets/variables.scss' as *;
4343
4444
.badge {
4545
display: flex;

src/components/hive-button/hive-button.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ useOnMount(emit);
2929
</template>
3030

3131
<style scoped lang="scss">
32-
@import '@/assets/variables.scss';
32+
@use '@/assets/variables.scss' as *;
3333
$height: var(--height, calc($common-widget-height + 2px));
3434
.hive-button {
3535
cursor: pointer;

src/components/hive-checkbox-group/hive-checkbox-group.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ watch(
111111
</template>
112112

113113
<style scoped lang="scss">
114-
@import '@/assets/variables.scss';
114+
@use '@/assets/variables.scss' as *;
115115
116116
$gap: 15px;
117117

src/components/hive-checkbox/hive-checkbox.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ if (Array.isArray(props.option)) {
8888
</template>
8989

9090
<style scoped lang="scss">
91-
@import '@/assets/variables.scss';
91+
@use '@/assets/variables.scss' as *;
9292
9393
$gap: 15px;
9494

0 commit comments

Comments
 (0)