@quaffui/quaff 0.1.0-prealpha6 → 0.1.0-prealpha8
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 +6 -3
- package/dist/components/button/QBtn.svelte.d.ts +1 -0
- package/dist/components/button/docs.props.js +8 -0
- package/dist/components/button/index.scss +1 -1
- package/dist/components/button/props.d.ts +7 -2
- package/dist/components/card/docs.props.js +1 -1
- package/dist/components/checkbox/index.scss +4 -0
- package/dist/components/chip/QChip.svelte +8 -2
- package/dist/components/chip/docs.props.js +3 -3
- package/dist/components/chip/props.d.ts +2 -2
- package/dist/components/codeBlock/QCodeBlock.svelte +1 -1
- package/dist/components/dialog/QDialog.svelte +7 -8
- package/dist/components/dialog/docs.props.js +10 -2
- package/dist/components/dialog/index.scss +150 -3
- package/dist/components/drawer/QDrawer.svelte +3 -2
- package/dist/components/drawer/QDrawer.svelte.d.ts +1 -0
- package/dist/components/drawer/props.d.ts +2 -2
- package/dist/components/footer/QFooter.svelte +13 -3
- package/dist/components/footer/props.d.ts +2 -2
- package/dist/components/icon/QIcon.svelte +11 -13
- package/dist/components/icon/QIcon.svelte.d.ts +1 -1
- package/dist/components/icon/docs.props.js +1 -1
- package/dist/components/icon/index.scss +63 -6
- package/dist/components/icon/props.d.ts +3 -3
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +2 -1
- package/dist/components/list/QItem.svelte +1 -1
- package/dist/components/list/docs.d.ts +2 -0
- package/dist/components/list/docs.js +11 -0
- package/dist/components/list/docs.props.js +1 -1
- package/dist/components/list/index.scss +6 -0
- package/dist/components/private/QApi.svelte +21 -20
- package/dist/components/private/QDocs.svelte +38 -10
- package/dist/components/private/QDocsSection.svelte +2 -2
- package/dist/components/progress/QCircularProgress.svelte +4 -3
- package/dist/components/progress/QCircularProgress.svelte.d.ts +1 -1
- package/dist/components/progress/QLinearProgress.svelte +8 -2
- package/dist/components/progress/docs.d.ts +2 -0
- package/dist/components/progress/docs.js +11 -0
- package/dist/components/progress/docs.props.d.ts +8 -0
- package/dist/components/progress/docs.props.js +42 -0
- package/dist/components/progress/index.scss +15 -0
- package/dist/components/progress/props.d.ts +26 -9
- package/dist/components/progress/props.js +1 -7
- package/dist/components/railbar/QRailbar.svelte +2 -1
- package/dist/components/railbar/QRailbar.svelte.d.ts +1 -1
- package/dist/components/railbar/docs.d.ts +2 -0
- package/dist/components/railbar/docs.js +11 -0
- package/dist/components/railbar/props.d.ts +11 -3
- package/dist/components/railbar/props.js +1 -7
- package/dist/components/select/QSelect.svelte +6 -4
- package/dist/components/select/docs.props.js +2 -2
- package/dist/components/separator/docs.d.ts +2 -0
- package/dist/components/separator/docs.js +11 -0
- package/dist/components/tabs/docs.d.ts +2 -0
- package/dist/components/tabs/docs.js +11 -0
- package/dist/components/tabs/docs.props.js +3 -11
- package/dist/components/toolbar/QToolbar.svelte +2 -1
- package/dist/components/toolbar/QToolbar.svelte.d.ts +1 -1
- package/dist/components/toolbar/QToolbarTitle.svelte +10 -0
- package/dist/components/toolbar/QToolbarTitle.svelte.d.ts +22 -0
- package/dist/components/toolbar/docs.d.ts +2 -0
- package/dist/components/toolbar/docs.js +11 -0
- package/dist/components/toolbar/docs.props.d.ts +8 -0
- package/dist/components/toolbar/docs.props.js +10 -0
- package/dist/components/toolbar/index.scss +27 -0
- package/dist/components/toolbar/props.d.ts +14 -3
- package/dist/components/toolbar/props.js +1 -6
- package/dist/components/tooltip/QTooltip.svelte +3 -5
- package/dist/components/tooltip/docs.d.ts +2 -0
- package/dist/components/tooltip/docs.js +11 -0
- package/dist/components/tooltip/index.scss +77 -2
- package/dist/composables/use-align.js +17 -6
- package/dist/composables/use-size.d.ts +8 -10
- package/dist/composables/use-size.js +24 -12
- package/dist/css/flex.scss +41 -0
- package/dist/css/fonts.scss +4 -0
- package/dist/css/grid.scss +1 -16
- package/dist/css/index.css +1 -1
- package/dist/css/index.scss +3 -22
- package/dist/css/theme/bridge.scss +15 -0
- package/dist/css/theme/elevate.scss +57 -0
- package/dist/css/theme/page.scss +16 -0
- package/dist/css/theme/palette.scss +633 -0
- package/dist/css/theme/reset.scss +40 -0
- package/dist/css/theme/theme.dark.scss +1 -0
- package/dist/css/theme/theme.light.scss +1 -0
- package/dist/css/theme/theme.scss +6 -0
- package/dist/css/theme/typography.scss +111 -0
- package/dist/css/variables-sass.scss +16 -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/types.d.ts +3 -0
- package/dist/utils/types.json +1 -1
- package/package.json +5 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import { useSize } from "../../composables/use-size";
|
|
2
|
+
import { createClasses, createStyles } from "../../utils/props";
|
|
2
3
|
export let shape = "circle", size = "md", src = void 0, video = false, userClasses = void 0, userStyles = void 0;
|
|
3
4
|
export { userClasses as class };
|
|
4
5
|
export { userStyles as style };
|
|
5
6
|
$:
|
|
6
|
-
|
|
7
|
+
sizeObj = useSize(size);
|
|
7
8
|
$:
|
|
8
9
|
shapeClass = createClasses([
|
|
9
10
|
shape === "circle" && "circle",
|
|
@@ -14,18 +15,18 @@ $:
|
|
|
14
15
|
shape.includes("right") && "right-round"
|
|
15
16
|
]);
|
|
16
17
|
$:
|
|
17
|
-
classes = createClasses([shapeClass,
|
|
18
|
+
classes = createClasses([shapeClass, sizeObj.class], {
|
|
18
19
|
component: "q-avatar",
|
|
19
20
|
userClasses
|
|
20
21
|
});
|
|
21
22
|
$:
|
|
22
|
-
style =
|
|
23
|
+
style = createStyles(
|
|
23
24
|
{
|
|
24
|
-
width:
|
|
25
|
-
height:
|
|
25
|
+
width: sizeObj.style,
|
|
26
|
+
height: sizeObj.style
|
|
26
27
|
},
|
|
27
28
|
userStyles
|
|
28
|
-
)
|
|
29
|
+
);
|
|
29
30
|
</script>
|
|
30
31
|
|
|
31
32
|
{#if video === true}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { NativeProps } from "../../utils/types";
|
|
1
|
+
import type { QuaffSizes, CssValue, NativeProps } from "../../utils/types";
|
|
2
2
|
export type QAvatarShapeOptions = "circle" | "rounded" | "top-round" | "left-round" | "right-round" | "bottom-round" | "top-left-round" | "top-right-round" | "bottom-left-round" | "bottom-right-round";
|
|
3
|
-
export type QAvatarSizeOptions =
|
|
3
|
+
export type QAvatarSizeOptions = QuaffSizes | CssValue | number;
|
|
4
4
|
export interface QAvatarProps extends NativeProps {
|
|
5
5
|
/**
|
|
6
6
|
* Shape of the avatar.
|
|
@@ -3,12 +3,15 @@ import { createEventDispatcher } from "svelte";
|
|
|
3
3
|
import QIcon from "../icon/QIcon.svelte";
|
|
4
4
|
import QCircularProgress from "../progress/QCircularProgress.svelte";
|
|
5
5
|
import { activationHandler } from "../../helpers/activationHandler";
|
|
6
|
-
|
|
6
|
+
import { useSize } from "../../composables/use-size";
|
|
7
|
+
export let icon = void 0, label = void 0, disable = false, loading = false, unelevated = false, outline = false, round = false, rectangle = false, flat = false, to = void 0, size = void 0, userClasses = void 0;
|
|
7
8
|
export { userClasses as class };
|
|
8
9
|
const emit = createEventDispatcher();
|
|
9
10
|
let tag;
|
|
10
11
|
$:
|
|
11
12
|
tag = to !== void 0 ? "a" : "div";
|
|
13
|
+
$:
|
|
14
|
+
sizeObj = useSize(size);
|
|
12
15
|
$:
|
|
13
16
|
classes = createClasses(
|
|
14
17
|
[
|
|
@@ -16,8 +19,8 @@ $:
|
|
|
16
19
|
rectangle && "rectangle",
|
|
17
20
|
outline && "outlined",
|
|
18
21
|
flat && "flat",
|
|
19
|
-
!$$slots.default && !label && "
|
|
20
|
-
size
|
|
22
|
+
(!$$slots.default && !label || round) && "round",
|
|
23
|
+
size !== "md" && sizeObj.class
|
|
21
24
|
],
|
|
22
25
|
{
|
|
23
26
|
component: "q-btn",
|
|
@@ -55,6 +55,14 @@ export const QBtnDocsProps = [
|
|
|
55
55
|
description: "Use rectangle design for the button, removing the large border-radius.",
|
|
56
56
|
default: "false",
|
|
57
57
|
},
|
|
58
|
+
{
|
|
59
|
+
name: "round",
|
|
60
|
+
type: "boolean",
|
|
61
|
+
optional: true,
|
|
62
|
+
clickableType: false,
|
|
63
|
+
description: "Use round design for the button, giving it a circular shape.",
|
|
64
|
+
default: "false",
|
|
65
|
+
},
|
|
58
66
|
{
|
|
59
67
|
name: "to",
|
|
60
68
|
type: "string",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { NativeProps } from "../../utils/types";
|
|
2
|
-
export type QBtnSizeOptions =
|
|
1
|
+
import type { NativeProps, QuaffSizes } from "../../utils/types";
|
|
2
|
+
export type QBtnSizeOptions = Exclude<QuaffSizes, "xs">;
|
|
3
3
|
export interface QBtnProps extends NativeProps {
|
|
4
4
|
/**
|
|
5
5
|
* Puts the button in a disabled state, making it unclickable.
|
|
@@ -36,6 +36,11 @@ export interface QBtnProps extends NativeProps {
|
|
|
36
36
|
* @default false
|
|
37
37
|
*/
|
|
38
38
|
rectangle?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Use round design for the button, giving it a circular shape.
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
round?: boolean;
|
|
39
44
|
/**
|
|
40
45
|
* Makes the button navigational. Can be used with the router (e.g to="/home") or as a normal href attribute (e.g to="#section-id").
|
|
41
46
|
* @default undefined
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { createClasses } from "../../utils/props";
|
|
3
3
|
import { createEventDispatcher } from "svelte";
|
|
4
4
|
import QIcon from "../icon/QIcon.svelte";
|
|
5
|
+
import { useSize } from "../../composables/use-size";
|
|
5
6
|
export let content = void 0, icon = void 0, iconRight = void 0, disable = false, responsive = false, vertical = false, round = false, outlined = false, size = "md", tabindex = void 0, href = void 0, userClasses = void 0;
|
|
6
7
|
export { userClasses as class };
|
|
7
8
|
const emit = createEventDispatcher();
|
|
@@ -10,10 +11,15 @@ $:
|
|
|
10
11
|
$:
|
|
11
12
|
imgRight = iconRight?.startsWith("img:") ? iconRight.slice(4) : void 0;
|
|
12
13
|
$:
|
|
13
|
-
|
|
14
|
+
sizeObj = useSize(size);
|
|
14
15
|
$:
|
|
15
16
|
classes = createClasses(
|
|
16
|
-
[
|
|
17
|
+
[
|
|
18
|
+
vertical && "vertical",
|
|
19
|
+
round && "rounded",
|
|
20
|
+
(outlined || disable) && "bordered",
|
|
21
|
+
size !== "md" && sizeObj.class
|
|
22
|
+
],
|
|
17
23
|
{
|
|
18
24
|
component: "q-chip",
|
|
19
25
|
userClasses
|
|
@@ -65,15 +65,15 @@ export const QChipDocsProps = [
|
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
name: "size",
|
|
68
|
-
type:
|
|
68
|
+
type: "QChipSizeOptions",
|
|
69
69
|
optional: true,
|
|
70
|
-
clickableType:
|
|
70
|
+
clickableType: true,
|
|
71
71
|
description: "Size of the chip.",
|
|
72
72
|
default: "small",
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
name: "tabindex",
|
|
76
|
-
type: "
|
|
76
|
+
type: "number",
|
|
77
77
|
optional: true,
|
|
78
78
|
clickableType: false,
|
|
79
79
|
description: "Tabindex of the chip.",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { NativeProps } from "../../utils/types";
|
|
2
|
-
export type QChipSizeOptions =
|
|
1
|
+
import type { NativeProps, QuaffSizes } from "../../utils/types";
|
|
2
|
+
export type QChipSizeOptions = Exclude<QuaffSizes, "xs" | "xl">;
|
|
3
3
|
export interface QChipProps extends NativeProps {
|
|
4
4
|
/**
|
|
5
5
|
* The content inside the chip. Will overwrite the default slot.
|
|
@@ -33,7 +33,7 @@ async function copyCode() {
|
|
|
33
33
|
|
|
34
34
|
<div class="q-code-block">
|
|
35
35
|
{#if copiable}
|
|
36
|
-
<div class="flex between
|
|
36
|
+
<div class="flex justify-between {title ? 'items-center' : 'justify-end'} q-pb-sm">
|
|
37
37
|
{#if title}
|
|
38
38
|
<h4 class="q-ma-none q-pr-lg">{title}</h4>
|
|
39
39
|
{/if}
|
|
@@ -11,14 +11,13 @@ $:
|
|
|
11
11
|
$:
|
|
12
12
|
positionClass = ["top", "right", "bottom", "left"].includes(position) ? position : void 0;
|
|
13
13
|
$:
|
|
14
|
-
classes = createClasses(
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
]);
|
|
14
|
+
classes = createClasses(
|
|
15
|
+
[value && "active", positionClass, modal && "modal", fullscreen && "max"],
|
|
16
|
+
{
|
|
17
|
+
component: "q-dialog",
|
|
18
|
+
userClasses
|
|
19
|
+
}
|
|
20
|
+
);
|
|
22
21
|
$:
|
|
23
22
|
value === true ? modal ? dialogElement?.showModal() : dialogElement?.show() : dialogElement?.close();
|
|
24
23
|
export function hide() {
|
|
@@ -55,6 +55,14 @@ export const QBtnDocsProps = [
|
|
|
55
55
|
description: "Use rectangle design for the button, removing the large border-radius.",
|
|
56
56
|
default: "false",
|
|
57
57
|
},
|
|
58
|
+
{
|
|
59
|
+
name: "round",
|
|
60
|
+
type: "boolean",
|
|
61
|
+
optional: true,
|
|
62
|
+
clickableType: false,
|
|
63
|
+
description: "Use round design for the button, giving it a circular shape.",
|
|
64
|
+
default: "false",
|
|
65
|
+
},
|
|
58
66
|
{
|
|
59
67
|
name: "to",
|
|
60
68
|
type: "string",
|
|
@@ -84,10 +92,10 @@ export const QDialogDocsProps = [
|
|
|
84
92
|
{
|
|
85
93
|
name: "value",
|
|
86
94
|
type: "boolean",
|
|
87
|
-
optional:
|
|
95
|
+
optional: false,
|
|
88
96
|
clickableType: false,
|
|
89
97
|
description: "The value indicating whether the dialog is visible or hidden.",
|
|
90
|
-
default: "
|
|
98
|
+
default: "true",
|
|
91
99
|
},
|
|
92
100
|
{
|
|
93
101
|
name: "noBtn",
|
|
@@ -1,10 +1,157 @@
|
|
|
1
|
-
|
|
1
|
+
.q-dialog {
|
|
2
|
+
display: block;
|
|
3
|
+
border: none;
|
|
4
|
+
opacity: 0;
|
|
5
|
+
visibility: hidden;
|
|
6
|
+
position: fixed;
|
|
7
|
+
box-shadow: var(--elevate2);
|
|
8
|
+
color: var(--on-surface);
|
|
9
|
+
background-color: var(--surface);
|
|
10
|
+
padding: 1rem;
|
|
11
|
+
z-index: 1000;
|
|
12
|
+
left: 50%;
|
|
13
|
+
top: 10%;
|
|
14
|
+
min-width: 20rem;
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
max-height: 80%;
|
|
17
|
+
overflow-x: hidden;
|
|
18
|
+
overflow-y: auto;
|
|
19
|
+
transition:
|
|
20
|
+
var(--speed3) all,
|
|
21
|
+
0s background-color;
|
|
22
|
+
transform: translate(-50%, -4rem);
|
|
2
23
|
animation-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
3
24
|
|
|
4
|
-
&:is(
|
|
25
|
+
&:is(&--active, [open]) {
|
|
26
|
+
opacity: 1;
|
|
27
|
+
visibility: visible;
|
|
28
|
+
transform: translate(-50%, 0);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&::backdrop {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:not(&--left, &--right, &--top, &--bottom) {
|
|
36
|
+
border-radius: 0.75rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&--small {
|
|
40
|
+
width: 25%;
|
|
41
|
+
height: 25%;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&--medium {
|
|
45
|
+
width: 50%;
|
|
46
|
+
height: 50%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&--large {
|
|
50
|
+
width: 75%;
|
|
51
|
+
height: 75%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&:is(&--active, [open]) {
|
|
55
|
+
opacity: 1;
|
|
56
|
+
visibility: visible;
|
|
57
|
+
transform: translate(-50%, 0);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:is(&--active, [open]):is(&--left, &--right, &--top, &--bottom, &--max) {
|
|
61
|
+
transform: translate(0, 0);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&--top {
|
|
65
|
+
opacity: 1;
|
|
66
|
+
top: 0;
|
|
67
|
+
left: 0;
|
|
68
|
+
right: auto;
|
|
69
|
+
bottom: auto;
|
|
70
|
+
height: auto;
|
|
71
|
+
width: 100%;
|
|
72
|
+
min-width: auto;
|
|
73
|
+
max-height: 100%;
|
|
74
|
+
transform: translateY(-100%);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&--left {
|
|
78
|
+
opacity: 1;
|
|
79
|
+
top: 0;
|
|
80
|
+
left: 0;
|
|
81
|
+
right: auto;
|
|
82
|
+
bottom: auto;
|
|
83
|
+
width: auto;
|
|
84
|
+
height: 100%;
|
|
85
|
+
max-height: 100%;
|
|
86
|
+
transform: translateX(-100%);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&--right {
|
|
90
|
+
opacity: 1;
|
|
91
|
+
top: 0;
|
|
92
|
+
left: auto;
|
|
93
|
+
right: 0;
|
|
94
|
+
bottom: auto;
|
|
95
|
+
width: auto;
|
|
96
|
+
height: 100%;
|
|
97
|
+
max-height: 100%;
|
|
98
|
+
transform: translateX(100%);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&--bottom {
|
|
102
|
+
opacity: 1;
|
|
103
|
+
top: auto;
|
|
104
|
+
left: 0;
|
|
105
|
+
right: auto;
|
|
106
|
+
bottom: 0;
|
|
107
|
+
height: auto;
|
|
108
|
+
width: 100%;
|
|
109
|
+
min-width: auto;
|
|
110
|
+
max-height: 100%;
|
|
111
|
+
transform: translateY(100%);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&--max {
|
|
115
|
+
top: 0;
|
|
116
|
+
left: 0;
|
|
117
|
+
right: auto;
|
|
118
|
+
bottom: auto;
|
|
119
|
+
width: 100%;
|
|
120
|
+
height: 100%;
|
|
121
|
+
max-width: 100%;
|
|
122
|
+
max-height: 100%;
|
|
123
|
+
transform: translateY(4rem);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&--small:is(&--left, &--right) {
|
|
127
|
+
width: 20rem;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&--medium:is(&--left, &--right) {
|
|
131
|
+
width: 32rem;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&--large:is(&--left, &--right) {
|
|
135
|
+
width: 44rem;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&--small:is(&--top, &--bottom) {
|
|
139
|
+
height: 16rem;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&--medium:is(&--top, &--bottom) {
|
|
143
|
+
height: 24rem;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&--large:is(&--top, &--bottom) {
|
|
147
|
+
height: 32rem;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&:is(&--left, &--right, &--top, &--bottom) {
|
|
5
151
|
border-radius: 0;
|
|
6
152
|
}
|
|
7
|
-
|
|
153
|
+
|
|
154
|
+
&--modal::backdrop {
|
|
8
155
|
display: block;
|
|
9
156
|
background-color: rgba(0, 0, 0, 0.5);
|
|
10
157
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { createClasses, createStyles } from "../../utils/props";
|
|
3
3
|
import { getContext } from "svelte";
|
|
4
4
|
import { clickOutside } from "../../helpers";
|
|
5
|
+
import { useSize } from "../../composables/use-size";
|
|
5
6
|
export let value = true, side = "left", width = 300, breakpoint = 1023, showIfAbove = false, behavior = "default", bordered = false, elevated = false, overlay = false, persistent = false, noSwipeOpen = false, noSwipeClose = false, noSwipeBackdrop = false, userClasses = void 0, userStyles = void 0;
|
|
6
7
|
export { userClasses as class, userStyles as style };
|
|
7
8
|
$:
|
|
@@ -10,7 +11,7 @@ $:
|
|
|
10
11
|
belowBreakpoint = behavior === "mobile" === true || behavior !== "desktop" && /** TODO: Get Layout width */
|
|
11
12
|
1300 <= breakpoint;
|
|
12
13
|
$:
|
|
13
|
-
widthStyle = ctx
|
|
14
|
+
widthStyle = $ctx && useSize(width).style;
|
|
14
15
|
$:
|
|
15
16
|
hideOnRouteChange = persistent !== true || overlay === true;
|
|
16
17
|
export const show = (e) => {
|
|
@@ -82,6 +83,6 @@ function getBorderRadiusClasses(sideProp, overlayProp, context) {
|
|
|
82
83
|
}
|
|
83
84
|
</script>
|
|
84
85
|
|
|
85
|
-
<div use:clickOutside={hide} class={classes} {style}>
|
|
86
|
+
<div use:clickOutside={hide} class={classes} {style} {...$$restProps}>
|
|
86
87
|
<slot />
|
|
87
88
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NativeProps } from "../../utils/types";
|
|
1
|
+
import type { CssValue, NativeProps } from "../../utils/types";
|
|
2
2
|
export type QDrawerSideOptions = "left" | "right";
|
|
3
3
|
export type QDrawerBehaviorOptions = "default" | "desktop" | "mobile";
|
|
4
4
|
export interface QDrawerProps extends NativeProps {
|
|
@@ -16,7 +16,7 @@ export interface QDrawerProps extends NativeProps {
|
|
|
16
16
|
* The width of the drawer. Can be specified with a CSS unit. If no unit is specified, "px" will be used.
|
|
17
17
|
* @default 300
|
|
18
18
|
*/
|
|
19
|
-
width?: number |
|
|
19
|
+
width?: number | CssValue;
|
|
20
20
|
/**
|
|
21
21
|
* The breakpoint at which the drawer behavior changes. (not supported yet)
|
|
22
22
|
* @default 1023
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
<script>import { getContext } from "svelte";
|
|
2
|
-
import { createClasses } from "../../utils/props";
|
|
2
|
+
import { createClasses, createStyles } from "../../utils/props";
|
|
3
|
+
import { useSize } from "../../composables/use-size";
|
|
3
4
|
export let value = true, bordered = false, elevated = false, height = void 0, userClasses = void 0, userStyles = void 0;
|
|
4
5
|
export { userClasses as class, userStyles as style };
|
|
5
6
|
let ctx = getContext("layout");
|
|
6
7
|
$:
|
|
7
|
-
|
|
8
|
+
heightStyle = $ctx && useSize(height).style;
|
|
9
|
+
$:
|
|
10
|
+
classes = createClasses(["q-footer", $ctx && $ctx.footer?.fixed && "fixed", userClasses]);
|
|
11
|
+
$:
|
|
12
|
+
style = createStyles(
|
|
13
|
+
{
|
|
14
|
+
"--footer-height": heightStyle
|
|
15
|
+
},
|
|
16
|
+
userStyles
|
|
17
|
+
);
|
|
8
18
|
</script>
|
|
9
19
|
|
|
10
|
-
<footer class={classes} style
|
|
20
|
+
<footer class={classes} {style}>
|
|
11
21
|
<nav>
|
|
12
22
|
<slot />
|
|
13
23
|
</nav>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NativeProps } from "../../utils/types";
|
|
1
|
+
import type { CssValue, NativeProps } from "../../utils/types";
|
|
2
2
|
export interface QFooterProps extends NativeProps {
|
|
3
3
|
/**
|
|
4
4
|
* The value indicating whether the footer is visible or hidden. (not supported yet)
|
|
@@ -19,5 +19,5 @@ export interface QFooterProps extends NativeProps {
|
|
|
19
19
|
* The height of the footer. Can be specified with a CSS unit. If not specified, "px" will be used. (not supported yet)
|
|
20
20
|
* @default undefined
|
|
21
21
|
*/
|
|
22
|
-
height?:
|
|
22
|
+
height?: number | CssValue;
|
|
23
23
|
}
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import { createClasses, createStyles } from "../../utils/props";
|
|
1
|
+
<script>import { createClasses, createStyles } from "../../utils/props";
|
|
3
2
|
import { isNumber } from "../../utils/types";
|
|
4
|
-
|
|
3
|
+
import { sizes } from "../../composables/use-size";
|
|
4
|
+
import { useSize } from "../../composables/use-size";
|
|
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
7
|
$:
|
|
7
|
-
|
|
8
|
+
sizeObj = useSize(size);
|
|
8
9
|
$:
|
|
9
|
-
classes = createClasses([
|
|
10
|
-
"q-icon",
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
color && `${color}-text`,
|
|
15
|
-
userClasses
|
|
16
|
-
]);
|
|
10
|
+
classes = createClasses([type, filled && "filled", sizeObj.class], {
|
|
11
|
+
component: "q-icon",
|
|
12
|
+
userClasses,
|
|
13
|
+
quaffClasses: [color && `text-${color}`]
|
|
14
|
+
});
|
|
17
15
|
$:
|
|
18
16
|
style = createStyles(
|
|
19
17
|
{
|
|
20
|
-
"
|
|
18
|
+
"--size": sizeObj.style
|
|
21
19
|
},
|
|
22
20
|
userStyles
|
|
23
21
|
);
|
|
@@ -5,7 +5,7 @@ declare const __propDef: {
|
|
|
5
5
|
size?: import("./props").QIconSizeOptions | undefined;
|
|
6
6
|
name?: QIconProps["name"];
|
|
7
7
|
type?: import("./props").QIconTypeOptions | undefined;
|
|
8
|
-
|
|
8
|
+
filled?: boolean | undefined;
|
|
9
9
|
svg?: QIconProps["svg"];
|
|
10
10
|
img?: QIconProps["img"];
|
|
11
11
|
imgAttributes?: Record<string, any> | undefined;
|
|
@@ -1,18 +1,75 @@
|
|
|
1
|
-
$icon-font: "Material Symbols Outlined";
|
|
2
|
-
|
|
3
1
|
.q-icon {
|
|
2
|
+
--font: "Material Symbols Outlined";
|
|
3
|
+
--size: 1.5rem;
|
|
4
4
|
overflow: visible;
|
|
5
|
-
font-family:
|
|
5
|
+
font-family: var(--font);
|
|
6
|
+
font-weight: normal;
|
|
7
|
+
font-style: normal;
|
|
8
|
+
font-size: var(--size);
|
|
9
|
+
letter-spacing: normal;
|
|
10
|
+
text-transform: none;
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
word-wrap: normal;
|
|
16
|
+
direction: ltr;
|
|
17
|
+
font-feature-settings: "liga";
|
|
18
|
+
-webkit-font-smoothing: antialiased;
|
|
19
|
+
vertical-align: middle;
|
|
20
|
+
text-align: center;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
width: var(--size);
|
|
23
|
+
min-width: var(--size);
|
|
24
|
+
height: var(--size);
|
|
25
|
+
min-height: var(--size);
|
|
26
|
+
box-sizing: content-box;
|
|
27
|
+
line-height: normal;
|
|
6
28
|
|
|
7
29
|
&--outlined {
|
|
8
|
-
|
|
30
|
+
--font: "Material Symbols Outlined";
|
|
9
31
|
}
|
|
10
32
|
|
|
11
33
|
&--rounded {
|
|
12
|
-
|
|
34
|
+
--font: "Material Symbols Rounded";
|
|
13
35
|
}
|
|
14
36
|
|
|
15
37
|
&--sharp {
|
|
16
|
-
|
|
38
|
+
--font: "Material Symbols Sharp";
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&--xs {
|
|
42
|
+
--size: 1rem;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&--sm {
|
|
46
|
+
--size: 1.25rem;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&--lg {
|
|
50
|
+
--size: 1.75rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&--xl {
|
|
54
|
+
--size: 2rem;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
> :is(img, svg) {
|
|
58
|
+
width: 100%;
|
|
59
|
+
height: 100%;
|
|
60
|
+
background-size: 100%;
|
|
61
|
+
border-radius: inherit;
|
|
62
|
+
position: absolute;
|
|
63
|
+
top: 0;
|
|
64
|
+
left: 0;
|
|
65
|
+
padding: inherit;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.filled
|
|
69
|
+
// we might need these selectors later:
|
|
70
|
+
// a.row:is(:hover, :focus) > i,
|
|
71
|
+
// .transparent:is(:hover, :focus) > i
|
|
72
|
+
{
|
|
73
|
+
font-variation-settings: "FILL" 1;
|
|
17
74
|
}
|
|
18
75
|
}
|