@quaffui/quaff 0.1.0-prealpha7 → 0.1.0-prealpha9
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/dist/components/avatar/QAvatar.svelte +8 -7
- package/dist/components/avatar/props.d.ts +2 -2
- package/dist/components/button/QBtn.svelte +20 -7
- package/dist/components/button/QBtn.svelte.d.ts +0 -1
- package/dist/components/button/index.scss +18 -1
- package/dist/components/button/props.d.ts +2 -2
- package/dist/components/chip/QChip.svelte +8 -2
- package/dist/components/chip/props.d.ts +2 -2
- package/dist/components/dialog/QDialog.svelte +28 -13
- package/dist/components/dialog/QDialog.svelte.d.ts +0 -1
- package/dist/components/drawer/QDrawer.svelte +49 -37
- package/dist/components/drawer/index.scss +11 -8
- package/dist/components/drawer/props.d.ts +2 -2
- package/dist/components/footer/QFooter.svelte +18 -4
- package/dist/components/footer/QFooter.svelte.d.ts +2 -2
- package/dist/components/footer/index.scss +23 -0
- package/dist/components/footer/props.d.ts +4 -4
- package/dist/components/header/QHeader.svelte +28 -0
- package/dist/components/header/QHeader.svelte.d.ts +24 -0
- package/dist/components/header/props.d.ts +15 -0
- package/dist/components/header/props.js +1 -0
- package/dist/components/icon/QIcon.svelte +5 -12
- package/dist/components/icon/props.d.ts +2 -2
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +2 -1
- package/dist/components/layout/index.scss +89 -75
- package/dist/components/list/index.scss +1 -0
- package/dist/components/private/QApi.svelte +3 -1
- package/dist/components/progress/QCircularProgress.svelte +4 -3
- package/dist/components/progress/QCircularProgress.svelte.d.ts +1 -1
- package/dist/components/progress/props.d.ts +26 -9
- package/dist/components/progress/props.js +1 -7
- package/dist/components/railbar/QRailbar.svelte +48 -29
- package/dist/components/railbar/QRailbar.svelte.d.ts +1 -1
- package/dist/components/railbar/index.scss +39 -0
- package/dist/components/railbar/props.d.ts +11 -3
- package/dist/components/railbar/props.js +1 -7
- package/dist/components/tabs/QTab.svelte +44 -16
- package/dist/components/tabs/QTab.svelte.d.ts +1 -3
- package/dist/components/tabs/QTabs.svelte +3 -7
- package/dist/components/tabs/index.scss +40 -9
- package/dist/components/toolbar/QToolbar.svelte +6 -22
- package/dist/components/toolbar/QToolbar.svelte.d.ts +3 -1
- package/dist/components/toolbar/index.scss +8 -0
- package/dist/components/toolbar/props.d.ts +19 -4
- package/dist/components/toolbar/props.js +1 -10
- package/dist/composables/use-size.d.ts +8 -8
- package/dist/composables/use-size.js +23 -13
- package/dist/css/index.css +1 -1
- package/dist/css/index.scss +2 -2
- package/dist/css/mixins.scss +1 -3
- package/dist/css/ripple.scss +42 -0
- package/dist/css/states.scss +6 -2
- package/dist/helpers/ripple.d.ts +10 -0
- package/dist/helpers/ripple.js +75 -0
- package/dist/helpers/version.d.ts +1 -1
- package/dist/helpers/version.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/utils/dom.d.ts +8 -0
- package/dist/utils/dom.js +71 -0
- package/dist/utils/events.d.ts +13 -0
- package/dist/utils/events.js +13 -0
- package/dist/utils/props.d.ts +1 -1
- package/dist/utils/props.js +1 -1
- package/dist/utils/types.d.ts +3 -0
- package/package.json +1 -1
- package/dist/css/material-symbols-outlined-latin-100-normal.woff +0 -0
- package/dist/css/material-symbols-outlined-latin-100-normal.woff2 +0 -0
- package/dist/css/material-symbols-outlined-latin-200-normal.woff +0 -0
- package/dist/css/material-symbols-outlined-latin-200-normal.woff2 +0 -0
- package/dist/css/material-symbols-outlined-latin-300-normal.woff +0 -0
- package/dist/css/material-symbols-outlined-latin-300-normal.woff2 +0 -0
- package/dist/css/material-symbols-outlined-latin-400-normal.woff +0 -0
- package/dist/css/material-symbols-outlined-latin-400-normal.woff2 +0 -0
- package/dist/css/material-symbols-rounded-latin-100-normal.woff +0 -0
- package/dist/css/material-symbols-rounded-latin-100-normal.woff2 +0 -0
- package/dist/css/material-symbols-rounded-latin-200-normal.woff +0 -0
- package/dist/css/material-symbols-rounded-latin-200-normal.woff2 +0 -0
- package/dist/css/material-symbols-rounded-latin-300-normal.woff +0 -0
- package/dist/css/material-symbols-rounded-latin-300-normal.woff2 +0 -0
- package/dist/css/material-symbols-rounded-latin-400-normal.woff +0 -0
- package/dist/css/material-symbols-rounded-latin-400-normal.woff2 +0 -0
- package/dist/css/material-symbols-sharp-latin-100-normal.woff +0 -0
- package/dist/css/material-symbols-sharp-latin-100-normal.woff2 +0 -0
- package/dist/css/material-symbols-sharp-latin-200-normal.woff +0 -0
- package/dist/css/material-symbols-sharp-latin-200-normal.woff2 +0 -0
- package/dist/css/material-symbols-sharp-latin-300-normal.woff +0 -0
- package/dist/css/material-symbols-sharp-latin-300-normal.woff2 +0 -0
- package/dist/css/material-symbols-sharp-latin-400-normal.woff +0 -0
- package/dist/css/material-symbols-sharp-latin-400-normal.woff2 +0 -0
- package/dist/css/roboto-cyrillic-400-normal.woff +0 -0
- package/dist/css/roboto-cyrillic-400-normal.woff2 +0 -0
- package/dist/css/roboto-cyrillic-ext-400-normal.woff +0 -0
- package/dist/css/roboto-cyrillic-ext-400-normal.woff2 +0 -0
- package/dist/css/roboto-greek-400-normal.woff +0 -0
- package/dist/css/roboto-greek-400-normal.woff2 +0 -0
- package/dist/css/roboto-latin-400-normal.woff +0 -0
- package/dist/css/roboto-latin-400-normal.woff2 +0 -0
- package/dist/css/roboto-latin-ext-400-normal.woff +0 -0
- package/dist/css/roboto-latin-ext-400-normal.woff2 +0 -0
- package/dist/css/roboto-vietnamese-400-normal.woff +0 -0
- package/dist/css/roboto-vietnamese-400-normal.woff2 +0 -0
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
<script>import { createClasses, createStyles } from "../../utils/props";
|
|
2
2
|
import { isNumber } from "../../utils/types";
|
|
3
3
|
import { sizes } from "../../composables/use-size";
|
|
4
|
+
import { useSize } from "../../composables/use-size";
|
|
4
5
|
export let size = "md", name = void 0, type = "outlined", filled = false, svg = void 0, img = void 0, imgAttributes = {}, color = void 0, userClasses = void 0, userStyles = void 0;
|
|
5
6
|
export { userClasses as class, userStyles as style };
|
|
6
|
-
let sizeStyle;
|
|
7
|
-
$: {
|
|
8
|
-
if (isNumber(size)) {
|
|
9
|
-
sizeStyle = `${size}px`;
|
|
10
|
-
} else if (typeof size === "string" && !sizes.includes(size)) {
|
|
11
|
-
sizeStyle = size;
|
|
12
|
-
} else {
|
|
13
|
-
sizeStyle = void 0;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
7
|
$:
|
|
17
|
-
|
|
8
|
+
sizeObj = useSize(size);
|
|
9
|
+
$:
|
|
10
|
+
classes = createClasses([type, filled && "filled", sizeObj.class], {
|
|
18
11
|
component: "q-icon",
|
|
19
12
|
userClasses,
|
|
20
13
|
quaffClasses: [color && `text-${color}`]
|
|
@@ -22,7 +15,7 @@ $:
|
|
|
22
15
|
$:
|
|
23
16
|
style = createStyles(
|
|
24
17
|
{
|
|
25
|
-
"--size":
|
|
18
|
+
"--size": sizeObj.style
|
|
26
19
|
},
|
|
27
20
|
userStyles
|
|
28
21
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { NativeProps } from "../../utils/types";
|
|
2
|
-
export type QIconSizeOptions =
|
|
1
|
+
import type { CssValue, NativeProps, QuaffSizes } from "../../utils/types";
|
|
2
|
+
export type QIconSizeOptions = QuaffSizes | CssValue | number;
|
|
3
3
|
export type QIconTypeOptions = "outlined" | "sharp" | "rounded";
|
|
4
4
|
export interface QIconProps extends NativeProps {
|
|
5
5
|
/**
|
|
@@ -9,6 +9,7 @@ import QCodeBlock from "./codeBlock/QCodeBlock.svelte";
|
|
|
9
9
|
import QDialog from "./dialog/QDialog.svelte";
|
|
10
10
|
import QDrawer from "./drawer/QDrawer.svelte";
|
|
11
11
|
import QFooter from "./footer/QFooter.svelte";
|
|
12
|
+
import QHeader from "./header/QHeader.svelte";
|
|
12
13
|
import QIcon from "./icon/QIcon.svelte";
|
|
13
14
|
import QInput from "./input/QInput.svelte";
|
|
14
15
|
import QSelect from "./select/QSelect.svelte";
|
|
@@ -27,4 +28,4 @@ import QToggle from "./toggle/QToggle.svelte";
|
|
|
27
28
|
import QToolbar from "./toolbar/QToolbar.svelte";
|
|
28
29
|
import QToolbarTitle from "./toolbar/QToolbarTitle.svelte";
|
|
29
30
|
import QTooltip from "./tooltip/QTooltip.svelte";
|
|
30
|
-
export { QAvatar, QBtn, QCard, QCardSection, QCardActions, QCheckbox, QChip, QCodeBlock, QDialog, QDrawer, QFooter, QIcon, QInput, QSelect, QLayout, QList, QItem, QItemSection, QLinearProgress, QRadio, QRailbar, QSeparator, QTabs, QTab, QTable, QToggle, QToolbar, QToolbarTitle, QTooltip, };
|
|
31
|
+
export { QAvatar, QBtn, QCard, QCardSection, QCardActions, QCheckbox, QChip, QCodeBlock, QDialog, QDrawer, QFooter, QHeader, QIcon, QInput, QSelect, QLayout, QList, QItem, QItemSection, QLinearProgress, QRadio, QRailbar, QSeparator, QTabs, QTab, QTable, QToggle, QToolbar, QToolbarTitle, QTooltip, };
|
package/dist/components/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import QCodeBlock from "./codeBlock/QCodeBlock.svelte";
|
|
|
9
9
|
import QDialog from "./dialog/QDialog.svelte";
|
|
10
10
|
import QDrawer from "./drawer/QDrawer.svelte";
|
|
11
11
|
import QFooter from "./footer/QFooter.svelte";
|
|
12
|
+
import QHeader from "./header/QHeader.svelte";
|
|
12
13
|
import QIcon from "./icon/QIcon.svelte";
|
|
13
14
|
import QInput from "./input/QInput.svelte";
|
|
14
15
|
import QSelect from "./select/QSelect.svelte";
|
|
@@ -27,4 +28,4 @@ import QToggle from "./toggle/QToggle.svelte";
|
|
|
27
28
|
import QToolbar from "./toolbar/QToolbar.svelte";
|
|
28
29
|
import QToolbarTitle from "./toolbar/QToolbarTitle.svelte";
|
|
29
30
|
import QTooltip from "./tooltip/QTooltip.svelte";
|
|
30
|
-
export { QAvatar, QBtn, QCard, QCardSection, QCardActions, QCheckbox, QChip, QCodeBlock, QDialog, QDrawer, QFooter, QIcon, QInput, QSelect, QLayout, QList, QItem, QItemSection, QLinearProgress, QRadio, QRailbar, QSeparator, QTabs, QTab, QTable, QToggle, QToolbar, QToolbarTitle, QTooltip, };
|
|
31
|
+
export { QAvatar, QBtn, QCard, QCardSection, QCardActions, QCheckbox, QChip, QCodeBlock, QDialog, QDrawer, QFooter, QHeader, QIcon, QInput, QSelect, QLayout, QList, QItem, QItemSection, QLinearProgress, QRadio, QRailbar, QSeparator, QTabs, QTab, QTable, QToggle, QToolbar, QToolbarTitle, QTooltip, };
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
--right-drawer-width: 300px;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
$contentSlot: ":not(.q-header, .q-footer, .q-railbar, .q-drawer)";
|
|
13
|
+
|
|
12
14
|
.q-layout {
|
|
13
15
|
position: relative;
|
|
14
16
|
width: 100%;
|
|
@@ -17,7 +19,7 @@
|
|
|
17
19
|
min-height: 100%;
|
|
18
20
|
overflow: hidden;
|
|
19
21
|
|
|
20
|
-
& >
|
|
22
|
+
& > #{$contentSlot} {
|
|
21
23
|
height: 100%;
|
|
22
24
|
overflow: auto;
|
|
23
25
|
transition: padding var(--speed3);
|
|
@@ -35,18 +37,18 @@
|
|
|
35
37
|
min-height: unset;
|
|
36
38
|
border-radius: 0;
|
|
37
39
|
|
|
38
|
-
|
|
39
|
-
height: 100%;
|
|
40
|
-
min-height: unset;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&.fixed {
|
|
40
|
+
&--fixed {
|
|
44
41
|
position: fixed;
|
|
45
42
|
|
|
46
43
|
&::before {
|
|
47
44
|
margin: 0;
|
|
48
45
|
}
|
|
49
46
|
}
|
|
47
|
+
|
|
48
|
+
& > nav {
|
|
49
|
+
height: 100%;
|
|
50
|
+
min-height: unset;
|
|
51
|
+
}
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
.q-layout > .q-footer {
|
|
@@ -60,12 +62,7 @@
|
|
|
60
62
|
min-height: unset;
|
|
61
63
|
border-radius: 0;
|
|
62
64
|
|
|
63
|
-
|
|
64
|
-
height: 100%;
|
|
65
|
-
min-height: unset;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&.fixed {
|
|
65
|
+
&--fixed {
|
|
69
66
|
position: fixed;
|
|
70
67
|
|
|
71
68
|
&::before {
|
|
@@ -73,7 +70,12 @@
|
|
|
73
70
|
}
|
|
74
71
|
}
|
|
75
72
|
|
|
76
|
-
&
|
|
73
|
+
& > nav {
|
|
74
|
+
height: 100%;
|
|
75
|
+
min-height: unset;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
& ~ #{$contentSlot} {
|
|
77
79
|
padding-bottom: var(--footer-height);
|
|
78
80
|
}
|
|
79
81
|
}
|
|
@@ -89,28 +91,28 @@
|
|
|
89
91
|
overflow: auto;
|
|
90
92
|
transition: all var(--speed3);
|
|
91
93
|
|
|
92
|
-
|
|
94
|
+
&--above {
|
|
93
95
|
z-index: 105;
|
|
94
96
|
}
|
|
95
97
|
|
|
96
|
-
|
|
98
|
+
&--fixed {
|
|
97
99
|
position: fixed;
|
|
98
100
|
}
|
|
99
101
|
|
|
100
|
-
|
|
102
|
+
&--left {
|
|
101
103
|
left: 0px;
|
|
102
104
|
width: var(--left-railbar-width);
|
|
103
105
|
|
|
104
|
-
&.bordered {
|
|
106
|
+
&.q-railbar--bordered {
|
|
105
107
|
border-right: 0.0625rem solid var(--outline);
|
|
106
108
|
}
|
|
107
109
|
}
|
|
108
110
|
|
|
109
|
-
|
|
111
|
+
&--right {
|
|
110
112
|
right: 0px;
|
|
111
113
|
width: var(--right-railbar-width);
|
|
112
114
|
|
|
113
|
-
&.bordered {
|
|
115
|
+
&.q-railbar--bordered {
|
|
114
116
|
border-left: 0.0625rem solid var(--outline);
|
|
115
117
|
}
|
|
116
118
|
}
|
|
@@ -149,29 +151,20 @@
|
|
|
149
151
|
}
|
|
150
152
|
|
|
151
153
|
.q-layout > .q-drawer {
|
|
152
|
-
//TODO Problems with z-index between multiple layouts
|
|
153
154
|
z-index: 101;
|
|
154
155
|
border-radius: 0;
|
|
155
156
|
|
|
156
|
-
|
|
157
|
+
&--above {
|
|
157
158
|
z-index: 104;
|
|
158
159
|
}
|
|
159
160
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
border-
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
&__right {
|
|
170
|
-
&--top {
|
|
171
|
-
border-top-right-radius: 16px;
|
|
172
|
-
}
|
|
173
|
-
&--bottom {
|
|
174
|
-
border-bottom-right-radius: 16px;
|
|
161
|
+
$horizontal: "left", "right";
|
|
162
|
+
$vertical: "top", "bottom";
|
|
163
|
+
|
|
164
|
+
@each $vPos in $vertical {
|
|
165
|
+
@each $hPos in $horizontal {
|
|
166
|
+
&--#{$vPos}-#{$hPos}-radius {
|
|
167
|
+
border-#{$vPos}-#{$hPos}-radius: 16px;
|
|
175
168
|
}
|
|
176
169
|
}
|
|
177
170
|
}
|
|
@@ -245,33 +238,35 @@ $elements: (
|
|
|
245
238
|
|
|
246
239
|
// Offset for content
|
|
247
240
|
.q-layout {
|
|
248
|
-
& > .q-header ~
|
|
241
|
+
& > .q-header ~ #{$contentSlot} {
|
|
249
242
|
padding-top: var(--header-height);
|
|
250
243
|
}
|
|
251
|
-
& > .q-footer ~
|
|
244
|
+
& > .q-footer ~ #{$contentSlot} {
|
|
252
245
|
padding-bottom: var(--footer-height);
|
|
253
246
|
}
|
|
254
|
-
|
|
247
|
+
|
|
248
|
+
& > .q-drawer.q-drawer--active.q-drawer--left:not(.q-drawer--overlay) ~ #{$contentSlot} {
|
|
255
249
|
padding-left: $L_Drawer;
|
|
256
250
|
}
|
|
257
|
-
& > .q-drawer.active.right:not(.overlay) ~
|
|
251
|
+
& > .q-drawer.q-drawer--active.q-drawer--right:not(.q-drawer--overlay) ~ #{$contentSlot} {
|
|
258
252
|
padding-right: $R_Drawer;
|
|
259
253
|
}
|
|
260
|
-
|
|
261
|
-
|
|
254
|
+
|
|
255
|
+
& > .q-railbar.q-railbar--left:not([style="display: none"]) {
|
|
256
|
+
& ~ #{$contentSlot} {
|
|
262
257
|
padding-left: $L_Railbar;
|
|
263
258
|
}
|
|
264
259
|
|
|
265
|
-
& ~ .q-drawer.active.left:not(.overlay) ~
|
|
260
|
+
& ~ .q-drawer.q-drawer--active.q-drawer--left:not(.q-drawer--overlay) ~ #{$contentSlot} {
|
|
266
261
|
padding-left: $L_Full;
|
|
267
262
|
}
|
|
268
263
|
}
|
|
269
|
-
& > .q-railbar.right:not([style="display: none"]) {
|
|
270
|
-
& ~
|
|
264
|
+
& > .q-railbar.q-railbar--right:not([style="display: none"]) {
|
|
265
|
+
& ~ #{$contentSlot} {
|
|
271
266
|
padding-right: $R_Railbar;
|
|
272
267
|
}
|
|
273
268
|
|
|
274
|
-
& ~ .q-drawer.active.right:not(.overlay) ~
|
|
269
|
+
& ~ .q-drawer.q-drawer--active.q-drawer--right:not(.q-drawer--overlay) ~ #{$contentSlot} {
|
|
275
270
|
padding-right: $R_Full;
|
|
276
271
|
}
|
|
277
272
|
}
|
|
@@ -280,31 +275,48 @@ $elements: (
|
|
|
280
275
|
// Inline offset for header, footer and drawers
|
|
281
276
|
.q-layout {
|
|
282
277
|
@each $pos, $el in $elements {
|
|
283
|
-
& > .q-railbar.left:not([style="display: none"]) {
|
|
284
|
-
&:not(.offset-#{$pos}) ~ .q-#{$el},
|
|
285
|
-
& ~ .q-drawer.left {
|
|
278
|
+
& > .q-railbar.q-railbar--left:not([style="display: none"]) {
|
|
279
|
+
&:not(.q-railbar--offset-#{$pos}) ~ .q-#{$el},
|
|
280
|
+
& ~ .q-drawer.q-drawer--left {
|
|
286
281
|
left: $L_Railbar;
|
|
287
282
|
}
|
|
288
283
|
|
|
289
|
-
&
|
|
284
|
+
&
|
|
285
|
+
~ .q-drawer.q-drawer--active.q-drawer--left:not(
|
|
286
|
+
.q-drawer--offset-#{$pos},
|
|
287
|
+
.q-drawer--overlay
|
|
288
|
+
)
|
|
289
|
+
~ .q-#{$el} {
|
|
290
290
|
left: $L_Full;
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
& > .q-railbar.right:not([style="display: none"]) {
|
|
294
|
-
&:not(.offset-#{$pos}) ~ .q-#{$el},
|
|
295
|
-
& ~ .q-drawer.right {
|
|
293
|
+
& > .q-railbar.q-railbar--right:not([style="display: none"]) {
|
|
294
|
+
&:not(.q-railbar--offset-#{$pos}) ~ .q-#{$el},
|
|
295
|
+
& ~ .q-drawer.q-drawer--right {
|
|
296
296
|
right: $R_Railbar;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
&
|
|
299
|
+
&
|
|
300
|
+
~ .q-drawer.q-drawer--active.q-drawer--right:not(
|
|
301
|
+
.q-drawer--offset-#{$pos},
|
|
302
|
+
.q-drawer--overlay
|
|
303
|
+
)
|
|
304
|
+
~ .q-#{$el} {
|
|
300
305
|
right: $R_Full;
|
|
301
306
|
}
|
|
302
307
|
}
|
|
303
308
|
|
|
304
|
-
&
|
|
309
|
+
&
|
|
310
|
+
> .q-drawer.q-drawer--active.q-drawer--left:not(.q-drawer--offset-#{$pos}, .q-drawer--overlay)
|
|
311
|
+
~ .q-#{$el} {
|
|
305
312
|
left: $L_Drawer;
|
|
306
313
|
}
|
|
307
|
-
&
|
|
314
|
+
&
|
|
315
|
+
> .q-drawer.q-drawer--active.q-drawer--right:not(
|
|
316
|
+
.q-drawer--offset-#{$pos},
|
|
317
|
+
.q-drawer--overlay
|
|
318
|
+
)
|
|
319
|
+
~ .q-#{$el} {
|
|
308
320
|
right: $R_Drawer;
|
|
309
321
|
}
|
|
310
322
|
}
|
|
@@ -313,40 +325,40 @@ $elements: (
|
|
|
313
325
|
// Width for header and footer
|
|
314
326
|
.q-layout {
|
|
315
327
|
@each $pos, $el in $elements {
|
|
316
|
-
& > .q-railbar.left:not(.offset-#{$pos}, [style="display: none"]) {
|
|
328
|
+
& > .q-railbar.q-railbar--left:not(.q-railbar--offset-#{$pos}, [style="display: none"]) {
|
|
317
329
|
// Left railbar
|
|
318
330
|
& ~ .q-#{$el} {
|
|
319
331
|
width: without($L_Railbar);
|
|
320
332
|
}
|
|
321
333
|
|
|
322
|
-
& ~ .q-drawer.active:not(.offset-#{$pos}, .overlay) {
|
|
334
|
+
& ~ .q-drawer.q-drawer--active:not(.q-drawer--offset-#{$pos}, .q-drawer--overlay) {
|
|
323
335
|
@include include-drawers(without($L_Railbar), $pos, $el);
|
|
324
336
|
}
|
|
325
337
|
|
|
326
|
-
& ~ .q-railbar.right:not(.offset-#{$pos}, [style="display: none"]) {
|
|
338
|
+
& ~ .q-railbar.q-railbar--right:not(.q-railbar--offset-#{$pos}, [style="display: none"]) {
|
|
327
339
|
// Left railbar + Right railbar
|
|
328
340
|
& ~ .q-#{$el} {
|
|
329
341
|
width: without($LR_Railbar);
|
|
330
342
|
}
|
|
331
343
|
|
|
332
|
-
& ~ .q-drawer.active:not(.offset-#{$pos}, .overlay) {
|
|
344
|
+
& ~ .q-drawer.q-drawer--active:not(.q-drawer--offset-#{$pos}, .q-drawer--overlay) {
|
|
333
345
|
@include include-drawers(without($LR_Railbar), $pos, $el);
|
|
334
346
|
}
|
|
335
347
|
}
|
|
336
348
|
}
|
|
337
349
|
|
|
338
|
-
& > .q-railbar.right:not(.offset-#{$pos}, [style="display: none"]) {
|
|
350
|
+
& > .q-railbar.q-railbar--right:not(.q-railbar--offset-#{$pos}, [style="display: none"]) {
|
|
339
351
|
// Right railbar
|
|
340
352
|
& ~ .q-#{$el} {
|
|
341
353
|
width: without($R_Railbar);
|
|
342
354
|
}
|
|
343
355
|
|
|
344
|
-
& ~ .q-drawer.active:not(.offset-#{$pos}, .overlay) {
|
|
356
|
+
& ~ .q-drawer.q-drawer--active:not(.q-drawer--offset-#{$pos}, .q-drawer--overlay) {
|
|
345
357
|
@include include-drawers(without($R_Railbar), $pos, $el);
|
|
346
358
|
}
|
|
347
359
|
}
|
|
348
360
|
|
|
349
|
-
& > .q-drawer.active:not(.offset-#{$pos}, .overlay) {
|
|
361
|
+
& > .q-drawer.q-drawer--active:not(.q-drawer--offset-#{$pos}, .q-drawer--overlay) {
|
|
350
362
|
@include include-drawers(100%, $pos, $el);
|
|
351
363
|
}
|
|
352
364
|
}
|
|
@@ -354,19 +366,21 @@ $elements: (
|
|
|
354
366
|
|
|
355
367
|
// Height for railbars and drawers
|
|
356
368
|
.q-layout {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
369
|
+
$drawerTypes: ".q-railbar", ".q-drawer";
|
|
370
|
+
|
|
371
|
+
@each $drawerType in $drawerTypes {
|
|
372
|
+
& > #{$drawerType} {
|
|
373
|
+
&#{$drawerType}--offset-top#{$drawerType}--offset-bottom {
|
|
374
|
+
height: calc(100% - var(--header-height) - var(--footer-height));
|
|
375
|
+
}
|
|
361
376
|
}
|
|
362
|
-
}
|
|
363
377
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
378
|
+
@each $pos, $el in $elements {
|
|
379
|
+
& > #{$drawerType} {
|
|
380
|
+
&#{$drawerType}--offset-#{$pos} {
|
|
381
|
+
#{$pos}: var(--#{$el}-height);
|
|
382
|
+
height: calc(100% - var(--#{$el}-height));
|
|
383
|
+
}
|
|
370
384
|
}
|
|
371
385
|
}
|
|
372
386
|
}
|
|
@@ -112,7 +112,9 @@ function handleDrawer(QDocument, doc, e) {
|
|
|
112
112
|
{/if}
|
|
113
113
|
</span>
|
|
114
114
|
</div>
|
|
115
|
-
<div slot="line1" class="q-mt-sm prop-description"
|
|
115
|
+
<div slot="line1" class="q-mt-sm prop-description" style="white-space: normal;">
|
|
116
|
+
{@html doc.description}
|
|
117
|
+
</div>
|
|
116
118
|
</QItemSection>
|
|
117
119
|
</QItem>
|
|
118
120
|
{/each}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import { useSize } from "../../composables/use-size";
|
|
2
|
+
import { createClasses } from "../../utils/props";
|
|
2
3
|
import { isNumber } from "../../utils/types";
|
|
3
4
|
export let value = 0, indeterminate = false, size = "2em", color = void 0, thickness = 5, userClasses = void 0;
|
|
4
5
|
export { userClasses as class };
|
|
5
6
|
$:
|
|
6
|
-
spinnerSize =
|
|
7
|
+
spinnerSize = useSize(size);
|
|
7
8
|
$:
|
|
8
9
|
classes = createClasses([indeterminate && "indeterminate"], {
|
|
9
10
|
component: "q-circular-progress",
|
|
@@ -12,7 +13,7 @@ $:
|
|
|
12
13
|
});
|
|
13
14
|
</script>
|
|
14
15
|
|
|
15
|
-
<svg class={classes} height={spinnerSize} width={spinnerSize} viewBox="25 25 50 50">
|
|
16
|
+
<svg class={classes} height={spinnerSize.style} width={spinnerSize.style} viewBox="25 25 50 50">
|
|
16
17
|
<circle
|
|
17
18
|
class="path"
|
|
18
19
|
cx="50"
|
|
@@ -4,7 +4,7 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
value?: number | undefined;
|
|
6
6
|
indeterminate?: boolean | undefined;
|
|
7
|
-
size?:
|
|
7
|
+
size?: number | `${number}px` | `${number}%` | `${number}em` | `${number}ex` | `${number}ch` | `${number}rem` | `${number}vw` | `${number}vh` | `${number}vmin` | `${number}vmax` | undefined;
|
|
8
8
|
color?: QCircularProgressProps["color"];
|
|
9
9
|
thickness?: number | undefined;
|
|
10
10
|
class?: string | undefined;
|
|
@@ -1,20 +1,37 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { NativeProps, CssValue } from "../../utils/types";
|
|
2
2
|
export interface QLinearProgressProps extends NativeProps {
|
|
3
|
+
/**
|
|
4
|
+
* @default 0
|
|
5
|
+
*/
|
|
3
6
|
value: number;
|
|
7
|
+
/**
|
|
8
|
+
* @default left
|
|
9
|
+
*/
|
|
4
10
|
from: "left" | "right";
|
|
11
|
+
/**
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
5
14
|
rounded: boolean;
|
|
6
15
|
}
|
|
7
16
|
export interface QCircularProgressProps extends NativeProps {
|
|
17
|
+
/**
|
|
18
|
+
* @default 0
|
|
19
|
+
*/
|
|
8
20
|
value: number;
|
|
21
|
+
/**
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
9
24
|
indeterminate: boolean;
|
|
10
|
-
|
|
25
|
+
/**
|
|
26
|
+
* @default 2em
|
|
27
|
+
*/
|
|
28
|
+
size: CssValue | number;
|
|
29
|
+
/**
|
|
30
|
+
* @default undefined
|
|
31
|
+
*/
|
|
11
32
|
color?: string;
|
|
33
|
+
/**
|
|
34
|
+
* @default 5
|
|
35
|
+
*/
|
|
12
36
|
thickness: number;
|
|
13
37
|
}
|
|
14
|
-
export declare const QLinearProgressPropsDefaults: {
|
|
15
|
-
userClasses?: string | undefined;
|
|
16
|
-
userStyles?: string | undefined;
|
|
17
|
-
value: number;
|
|
18
|
-
from: string;
|
|
19
|
-
rounded: boolean;
|
|
20
|
-
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script>import { getContext } from "svelte";
|
|
2
2
|
import { createClasses, createStyles } from "../../utils/props";
|
|
3
|
-
import {
|
|
3
|
+
import { useSize } from "../../composables/use-size";
|
|
4
|
+
import { derived } from "svelte/store";
|
|
4
5
|
export let width = 88, side = "left", bordered = false, userClasses = void 0, userStyles = void 0;
|
|
5
6
|
export { userClasses as class, userStyles as style };
|
|
6
7
|
let ctx = getContext("layout");
|
|
@@ -8,20 +9,23 @@ let drawerType;
|
|
|
8
9
|
$:
|
|
9
10
|
drawerType = side === "left" ? "drawerLeft" : "drawerRight";
|
|
10
11
|
$:
|
|
11
|
-
classes = createClasses(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
classes = createClasses(
|
|
13
|
+
[
|
|
14
|
+
side,
|
|
15
|
+
bordered && "bordered",
|
|
16
|
+
$ctx && $ctx[drawerType].offset.top && "offset-top",
|
|
17
|
+
$ctx && $ctx[drawerType].offset.bottom && "offset-bottom",
|
|
18
|
+
$ctx && $ctx[drawerType].fixed && "fixed",
|
|
19
|
+
$borderRadiusClasses,
|
|
20
|
+
$zIndexClass
|
|
21
|
+
],
|
|
22
|
+
{
|
|
23
|
+
component: "q-railbar",
|
|
24
|
+
userClasses
|
|
25
|
+
}
|
|
26
|
+
);
|
|
23
27
|
$:
|
|
24
|
-
widthStyle = ctx
|
|
28
|
+
widthStyle = !$ctx && useSize(width).style;
|
|
25
29
|
$:
|
|
26
30
|
style = createStyles(
|
|
27
31
|
{
|
|
@@ -29,22 +33,37 @@ $:
|
|
|
29
33
|
},
|
|
30
34
|
userStyles
|
|
31
35
|
);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
$:
|
|
37
|
+
borderRadiusClasses = ctx && // No border radius if this isn't a layout railbar
|
|
38
|
+
derived(ctx, (context) => {
|
|
39
|
+
const borderSide = side === "left" ? "right" : "left";
|
|
40
|
+
const shouldHaveRadius = (pos) => {
|
|
41
|
+
let appBarEl = pos === "top" ? context["header"] : context["footer"];
|
|
42
|
+
if (context[drawerType].drawer) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
return !appBarEl?.display || context[drawerType].offset[pos];
|
|
46
|
+
};
|
|
47
|
+
return createClasses(
|
|
48
|
+
[
|
|
49
|
+
shouldHaveRadius("top") && `top-${borderSide}-radius`,
|
|
50
|
+
shouldHaveRadius("bottom") && `bottom-${borderSide}-radius`
|
|
51
|
+
],
|
|
52
|
+
{
|
|
53
|
+
component: "q-railbar"
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
$:
|
|
58
|
+
zIndexClass = ctx && derived(ctx, (context) => {
|
|
59
|
+
let drawer = side === "left" ? context.drawerLeft : context.drawerRight;
|
|
60
|
+
let pos;
|
|
61
|
+
for (pos of ["top", "bottom"]) {
|
|
62
|
+
if (!drawer.offset[pos] && drawer.overlay) {
|
|
63
|
+
return "above";
|
|
64
|
+
}
|
|
45
65
|
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
66
|
+
});
|
|
48
67
|
</script>
|
|
49
68
|
|
|
50
69
|
<nav class={classes} {style}>
|
|
@@ -2,7 +2,7 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
import type { QRailbarProps } from "./props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
width?:
|
|
5
|
+
width?: number | `${number}px` | `${number}%` | `${number}em` | `${number}ex` | `${number}ch` | `${number}rem` | `${number}vw` | `${number}vh` | `${number}vmin` | `${number}vmax` | undefined;
|
|
6
6
|
side?: "left" | "right" | undefined;
|
|
7
7
|
bordered?: boolean | undefined;
|
|
8
8
|
class?: string | undefined;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.q-railbar {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: flex-start;
|
|
6
|
+
text-align: center;
|
|
7
|
+
vertical-align: middle;
|
|
8
|
+
|
|
9
|
+
border: 0;
|
|
10
|
+
border-radius: 0;
|
|
11
|
+
margin: 0;
|
|
12
|
+
padding: 0.5rem;
|
|
13
|
+
|
|
14
|
+
position: fixed;
|
|
15
|
+
top: 0;
|
|
16
|
+
bottom: 0;
|
|
17
|
+
height: auto;
|
|
18
|
+
width: auto;
|
|
19
|
+
gap: 1rem;
|
|
20
|
+
|
|
21
|
+
color: var(--on-surface);
|
|
22
|
+
background-color: var(--surface);
|
|
23
|
+
|
|
24
|
+
z-index: 100;
|
|
25
|
+
transform: none;
|
|
26
|
+
white-space: nowrap;
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
|
|
29
|
+
&::-webkit-scrollbar {
|
|
30
|
+
display: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&__left {
|
|
34
|
+
left: 0;
|
|
35
|
+
}
|
|
36
|
+
&__right {
|
|
37
|
+
right: 0;
|
|
38
|
+
}
|
|
39
|
+
}
|