File tree Expand file tree Collapse file tree 5 files changed +48
-43
lines changed
styles/src/components/action Expand file tree Collapse file tree 5 files changed +48
-43
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export const componentNames = [
8
8
"BaseInput" ,
9
9
"BaseSelect" ,
10
10
"BaseWrapper" ,
11
+ "BaseBox" ,
11
12
"BaseErrorBoundary" ,
12
13
// icon
13
14
"Icon" ,
Original file line number Diff line number Diff line change 40
40
</template >
41
41
<LoaderSimple v-else-if =" !noLoader" :label =" label" :theme =" theme" />
42
42
</div >
43
- <BaseWrapper v-else :wrap =" !unwrap" :el =" el" :class =" $attrs.class " >
43
+ <BaseWrapper v-else :wrap =" !unwrap" :el =" el" v-bind =" $attrs" >
44
44
<div v-if =" loading && !noLoader" class =" back --overlay is--active" >
45
45
<LoaderSimple :label =" label" :theme =" theme" />
46
46
</div >
Original file line number Diff line number Diff line change 1
1
<template >
2
- <header
2
+ <LoaderContent
3
3
ref =" wrapperRef"
4
+ :loading =" loading"
5
+ content
4
6
class =" xamu-slider"
7
+ el =" header"
8
+ :theme =" theme"
5
9
@mouseover =" mouseOnTabs = true"
6
10
@mouseleave =" mouseOnTabs = false"
7
11
>
19
23
>
20
24
<slot ></slot >
21
25
</component >
22
- <LoaderSimple v-if =" loading" :theme =" theme" />
23
26
</div >
24
27
<ul
25
28
v-if =" childCount > 1 && controls"
64
67
</li >
65
68
</ul >
66
69
</div >
67
- </header >
70
+ </LoaderContent >
68
71
</template >
69
72
70
73
<script setup lang="ts">
78
81
import IconFa from " ../icon/Fa.vue" ;
79
82
import ActionButton from " ../action/Button.vue" ;
80
83
import ActionButtonToggle from " ../action/ButtonToggle.vue" ;
81
- import LoaderSimple from " ../loader/Simple .vue" ;
84
+ import LoaderContent from " ../loader/Content .vue" ;
82
85
83
86
import { useHelpers } from " ../../composables/utils" ;
84
87
import type { iUseThemeProps } from " ../../types/props" ;
284
287
* Set slider interval
285
288
*/
286
289
function launchInterval() {
287
- loading .value = true ;
288
-
289
290
if (! sliderRef .value || ! sliderContainerRef .value ) return ;
290
291
291
292
const slides = Array .from (sliderRef .value .children || []) as HTMLElement [];
307
308
308
309
debouncedTab (false );
309
310
}, props .intervalDuration );
310
- loading .value = false ;
311
311
}
312
312
313
313
/**
318
318
// lifecycle
319
319
if (isBrowser ) {
320
320
onMounted (() => {
321
+ loading .value = true ;
321
322
launchInterval ();
323
+ loading .value = false ;
322
324
});
323
325
324
326
onBeforeUnmount (() => {
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ export { default as BaseAction } from "./components/base/Action.vue";
4
4
export { default as BaseInput } from "./components/base/Input.vue" ;
5
5
export { default as BaseSelect } from "./components/base/Select.vue" ;
6
6
export { default as BaseWrapper } from "./components/base/Wrapper.vue" ;
7
+ export { default as BaseBox } from "./components/base/Box.vue" ;
7
8
export { default as BaseErrorBoundary } from "./components/base/ErrorBoundary.vue" ;
8
9
9
10
// icon
Original file line number Diff line number Diff line change 36
36
@include module .flex-box (column , nowrap , flex-start , stretch );
37
37
38
38
@layer defaults {
39
- > :not ( :last-child ) {
40
- // @defaults mBottom
41
- margin-bottom : 1rem ;
39
+ & {
40
+ // @defaults
41
+ gap : 1rem ;
42
42
}
43
43
}
44
44
}
115
115
}
116
116
}
117
117
118
- > .#{module .$component-box } {
118
+ // Square shape
119
+ // this assummes there is only one child
120
+ //
121
+ // @group Modifiers
122
+ & [class *= " --square" ] {
123
+ margin-left : auto ;
124
+ margin-right : auto ;
125
+ overflow : hidden ;
126
+
127
+ & ::before {
128
+ content : " " ;
129
+ display : block ;
130
+ width : 100% ;
131
+ height : 0 ;
132
+ padding-bottom : 100% ;
133
+ }
134
+
135
+ > * {
136
+ position : absolute ;
137
+ top : 50% ;
138
+ left : 50% ;
139
+ transform : translate (-50% , -50% );
140
+ }
141
+
119
142
& :has (img ) {
120
143
padding : 0 ;
121
144
}
128
151
}
129
152
}
130
153
}
154
+ }
131
155
132
- // Square shape
133
- // this assummes there is only one child
134
- //
135
- // @group Modifiers
136
- @include module .extend-maps (
137
- module .$element-sizes ,
138
- meta .get-function (" box-square-size-selector" ),
139
- md,
140
- " .#{module .$prefix-default } --square"
141
- )
142
- using ($name , $value , $is-default ) {
143
- width : $value ;
144
- margin-left : auto ;
145
- margin-right : auto ;
146
- overflow : hidden ;
147
-
148
- & ::before {
149
- content : " " ;
150
- display : block ;
151
- width : 100% ;
152
- height : 0 ;
153
- padding-bottom : 100% ;
154
- }
155
-
156
- > * {
157
- position : absolute ;
158
- top : 50% ;
159
- left : 50% ;
160
- transform : translate (-50% , -50% );
161
- }
162
- }
156
+ @include module .extend-maps (
157
+ module .$element-sizes ,
158
+ meta .get-function (" box-square-size-selector" ),
159
+ md,
160
+ " .#{module .$prefix-default } --square"
161
+ )
162
+ using ($name , $value , $is-default ) {
163
+ width : $value ;
163
164
}
164
165
}
165
166
}
You can’t perform that action at this time.
0 commit comments