@quaffui/quaff 0.1.0-prealpha15 → 0.1.0-prealpha16
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 +13 -3
- package/dist/components/avatar/docs.d.ts +1 -1
- package/dist/components/avatar/docs.js +1 -1
- package/dist/components/breadcrumbs/QBreadcrumbs.svelte +1 -2
- package/dist/components/breadcrumbs/QBreadcrumbsEl.svelte +5 -7
- package/dist/components/breadcrumbs/docs.d.ts +1 -1
- package/dist/components/breadcrumbs/docs.js +1 -1
- package/dist/components/button/QBtn.svelte +4 -1
- package/dist/components/button/docs.d.ts +1 -1
- package/dist/components/button/docs.js +1 -1
- package/dist/components/button/index.scss +6 -1
- package/dist/components/card/QCard.svelte +1 -1
- package/dist/components/card/QCardSection.svelte +2 -2
- package/dist/components/card/docs.d.ts +3 -3
- package/dist/components/card/docs.js +3 -3
- package/dist/components/checkbox/QCheckbox.svelte +1 -5
- package/dist/components/checkbox/docs.d.ts +1 -1
- package/dist/components/checkbox/docs.js +1 -1
- package/dist/components/chip/QChip.svelte +4 -1
- package/dist/components/chip/docs.d.ts +1 -1
- package/dist/components/chip/docs.js +1 -1
- package/dist/components/codeBlock/QCodeBlock.svelte +8 -12
- package/dist/components/codeBlock/QCodeBlock.svelte.d.ts +1 -0
- package/dist/components/codeBlock/docs.props.js +2 -2
- package/dist/components/codeBlock/props.d.ts +1 -1
- package/dist/components/dialog/docs.d.ts +1 -1
- package/dist/components/dialog/docs.js +1 -1
- package/dist/components/drawer/QDrawer.svelte +1 -4
- package/dist/components/drawer/QDrawer.svelte.d.ts +0 -7
- package/dist/components/drawer/docs.d.ts +1 -1
- package/dist/components/drawer/docs.js +1 -1
- package/dist/components/footer/QFooter.svelte +7 -5
- package/dist/components/footer/docs.d.ts +1 -1
- package/dist/components/footer/docs.js +1 -1
- package/dist/components/icon/docs.d.ts +1 -1
- package/dist/components/icon/docs.js +1 -1
- package/dist/components/icon/docs.props.js +3 -3
- package/dist/components/icon/props.d.ts +2 -2
- package/dist/components/input/docs.d.ts +1 -1
- package/dist/components/input/docs.js +1 -1
- package/dist/components/layout/docs.d.ts +1 -1
- package/dist/components/layout/docs.js +1 -1
- package/dist/components/list/QItemSection.svelte +1 -4
- package/dist/components/list/QList.svelte +6 -5
- package/dist/components/list/docs.d.ts +1 -1
- package/dist/components/list/docs.js +1 -1
- package/dist/components/list/docs.props.js +1 -1
- package/dist/components/list/props.d.ts +1 -1
- package/dist/components/list/props.js +1 -1
- package/dist/components/private/QApi.svelte +14 -7
- package/dist/components/private/QApi.svelte.d.ts +1 -1
- package/dist/components/private/QDocs.svelte +3 -13
- package/dist/components/private/QDocs.svelte.d.ts +1 -1
- package/dist/components/private/QDocsSection.svelte +5 -13
- package/dist/components/private/QDocsSection.svelte.d.ts +7 -17
- package/dist/components/progress/docs.d.ts +1 -1
- package/dist/components/progress/docs.js +1 -1
- package/dist/components/radio/docs.d.ts +1 -1
- package/dist/components/radio/docs.js +1 -1
- package/dist/components/radio/docs.props.js +2 -2
- package/dist/components/radio/props.d.ts +1 -1
- package/dist/components/railbar/docs.d.ts +1 -1
- package/dist/components/railbar/docs.js +1 -1
- package/dist/components/select/docs.d.ts +1 -1
- package/dist/components/select/docs.js +1 -1
- package/dist/components/separator/docs.d.ts +1 -1
- package/dist/components/separator/docs.js +1 -1
- package/dist/components/table/docs.d.ts +1 -1
- package/dist/components/table/docs.js +1 -1
- package/dist/components/tabs/QTab.svelte +2 -7
- package/dist/components/tabs/QTabs.svelte +2 -6
- package/dist/components/tabs/docs.d.ts +1 -1
- package/dist/components/tabs/docs.js +1 -1
- package/dist/components/tabs/docs.props.js +1 -1
- package/dist/components/tabs/props.js +1 -1
- package/dist/components/toggle/docs.d.ts +1 -1
- package/dist/components/toggle/docs.js +1 -1
- package/dist/components/toolbar/docs.d.ts +1 -1
- package/dist/components/toolbar/docs.js +1 -1
- package/dist/components/tooltip/docs.d.ts +1 -1
- package/dist/components/tooltip/docs.js +1 -1
- package/dist/composables/index.d.ts +3 -3
- package/dist/composables/index.js +3 -3
- package/dist/composables/{use-size.d.ts → useSize.d.ts} +1 -1
- package/dist/composables/{use-size.js → useSize.js} +1 -1
- package/dist/css/fonts.scss +16 -3
- package/dist/css/index.css +1 -1
- package/dist/css/ripple.scss +1 -1
- package/dist/global.d.ts +1 -1
- package/dist/helpers/clickOutside.d.ts +2 -2
- package/dist/helpers/clickOutside.js +3 -3
- package/dist/helpers/ripple.js +1 -1
- package/dist/helpers/version.d.ts +1 -1
- package/dist/helpers/version.js +1 -1
- package/dist/stores/QTheme.js +5 -6
- package/dist/stores/Quaff.js +1 -1
- package/dist/utils/clipboard.js +2 -2
- package/dist/utils/colors.js +2 -1
- package/dist/utils/dom.js +4 -4
- package/dist/utils/props.d.ts +2 -2
- package/dist/utils/props.js +5 -5
- package/dist/utils/string.js +1 -1
- package/dist/utils/types.d.ts +2 -2
- package/dist/utils/watchable.js +1 -1
- package/package.json +7 -7
- /package/dist/composables/{use-align.d.ts → useAlign.d.ts} +0 -0
- /package/dist/composables/{use-align.js → useAlign.js} +0 -0
- /package/dist/composables/{use-router-link.d.ts → useRouterLink.d.ts} +0 -0
- /package/dist/composables/{use-router-link.js → useRouterLink.js} +0 -0
|
@@ -17,7 +17,12 @@ $:
|
|
|
17
17
|
class:q-avatar--right-round={shape?.includes("right")}
|
|
18
18
|
style:width={sizeObj.style}
|
|
19
19
|
style:height={sizeObj.style}
|
|
20
|
-
autoplay
|
|
20
|
+
autoplay
|
|
21
|
+
loop
|
|
22
|
+
playsinline
|
|
23
|
+
{...$$restProps}
|
|
24
|
+
on:click
|
|
25
|
+
>
|
|
21
26
|
<source {src} type="video/mp4" />
|
|
22
27
|
</video>
|
|
23
28
|
{:else if src !== undefined}
|
|
@@ -33,7 +38,10 @@ $:
|
|
|
33
38
|
class:q-avatar--right-round={shape?.includes("right")}
|
|
34
39
|
style:width={sizeObj.style}
|
|
35
40
|
style:height={sizeObj.style}
|
|
36
|
-
{src}
|
|
41
|
+
{src}
|
|
42
|
+
{...$$restProps}
|
|
43
|
+
on:click
|
|
44
|
+
/>
|
|
37
45
|
{:else}
|
|
38
46
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
39
47
|
<div
|
|
@@ -46,7 +54,9 @@ $:
|
|
|
46
54
|
class:q-avatar--right-round={shape?.includes("right")}
|
|
47
55
|
style:width={sizeObj.style}
|
|
48
56
|
style:height={sizeObj.style}
|
|
49
|
-
{...$$restProps}
|
|
57
|
+
{...$$restProps}
|
|
58
|
+
on:click
|
|
59
|
+
>
|
|
50
60
|
<slot />
|
|
51
61
|
</div>
|
|
52
62
|
{/if}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { QComponentDocs } from "../../utils";
|
|
2
|
-
export declare
|
|
2
|
+
export declare const QAvatarDocs: QComponentDocs;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QAvatarDocsProps } from "./docs.props";
|
|
2
|
-
export
|
|
2
|
+
export const QAvatarDocs = {
|
|
3
3
|
name: "QAvatar",
|
|
4
4
|
description: "Avatars can be used in many different ways as with icons or for user profile images/videos, for example. They can have many different shapes, the default one being a circle.",
|
|
5
5
|
docs: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import { onMount, setContext } from "svelte";
|
|
1
|
+
<script>import { onMount, setContext } from "svelte";
|
|
3
2
|
export let separator = "/", gutter = "sm", activeColor = "primary", separatorColor = "outline", userClasses = "";
|
|
4
3
|
export { userClasses as class };
|
|
5
4
|
let breadcrumbElement;
|
|
@@ -5,7 +5,9 @@ import { QIcon } from "../..";
|
|
|
5
5
|
export let label = "", icon = void 0, tag = "div", to = void 0, href = void 0, activeClass = "q-breadcrumbs__el--active", userClasses = "";
|
|
6
6
|
export { userClasses as class };
|
|
7
7
|
const activeColor = getContext("activeColor");
|
|
8
|
-
const separator = getContext(
|
|
8
|
+
const separator = getContext(
|
|
9
|
+
"separator"
|
|
10
|
+
);
|
|
9
11
|
$:
|
|
10
12
|
isActive = isRouteActive($Quaff.router, href || to);
|
|
11
13
|
$:
|
|
@@ -21,9 +23,7 @@ $:
|
|
|
21
23
|
</div>
|
|
22
24
|
|
|
23
25
|
{#if href !== undefined || to !== undefined}
|
|
24
|
-
<a href={href || to}
|
|
25
|
-
class="q-breadcrumb__el {activeClasses} {userClasses}"
|
|
26
|
-
>
|
|
26
|
+
<a href={href || to} class="q-breadcrumb__el {activeClasses} {userClasses}">
|
|
27
27
|
{#if icon !== undefined}
|
|
28
28
|
<QIcon name={icon} size="1rem" />
|
|
29
29
|
{:else if $$slots.icon}
|
|
@@ -35,9 +35,7 @@ $:
|
|
|
35
35
|
</slot>
|
|
36
36
|
</a>
|
|
37
37
|
{:else}
|
|
38
|
-
<svelte:element this={tag}
|
|
39
|
-
class="q-breadcrumb__el {activeClasses} {userClasses}"
|
|
40
|
-
>
|
|
38
|
+
<svelte:element this={tag} class="q-breadcrumb__el {activeClasses} {userClasses}">
|
|
41
39
|
{#if icon !== undefined}
|
|
42
40
|
<QIcon name={icon} size="1rem" />
|
|
43
41
|
{:else if $$slots.icon}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { QComponentDocs } from "../../utils";
|
|
2
|
-
export declare
|
|
2
|
+
export declare const QBreadcrumbsDocs: QComponentDocs;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QBreadcrumbsDocsProps } from "./docs.props";
|
|
2
|
-
export
|
|
2
|
+
export const QBreadcrumbsDocs = {
|
|
3
3
|
name: "QBreadcrumbs",
|
|
4
4
|
description: "Breadcrumbs are mostly used as a navigation aid. They allow users to keep track of their location within the page.",
|
|
5
5
|
docs: {
|
|
@@ -29,7 +29,10 @@ function onKeyDown(e) {
|
|
|
29
29
|
|
|
30
30
|
<svelte:element
|
|
31
31
|
this={tag}
|
|
32
|
-
use:ripple={{
|
|
32
|
+
use:ripple={{
|
|
33
|
+
disable: noRipple || disable,
|
|
34
|
+
color: flat || outline ? undefined : "var(--on-primary)",
|
|
35
|
+
}}
|
|
33
36
|
bind:this={qBtn}
|
|
34
37
|
aria-disabled={disable || undefined}
|
|
35
38
|
class="q-btn {sizeClass} {userClasses}"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { QComponentDocs } from "../../utils";
|
|
2
|
-
export declare
|
|
2
|
+
export declare const QBtnDocs: QComponentDocs;
|
|
@@ -84,10 +84,15 @@
|
|
|
84
84
|
width: 100%;
|
|
85
85
|
height: 100%;
|
|
86
86
|
background-color: var(--on-primary);
|
|
87
|
+
border-radius: inherit;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&:is(&--flat, &--outlined):is(:hover, :focus):not([aria-disabled])::after {
|
|
91
|
+
background-color: var(--on-primary-container);
|
|
87
92
|
}
|
|
88
93
|
|
|
89
94
|
&:hover:not([aria-disabled])::after {
|
|
90
|
-
opacity: 0.
|
|
95
|
+
opacity: 0.12;
|
|
91
96
|
}
|
|
92
97
|
|
|
93
98
|
&:focus:not([aria-disabled])::after {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { QComponentDocs } from "../../utils";
|
|
2
|
-
export declare
|
|
3
|
-
export declare
|
|
4
|
-
export declare
|
|
2
|
+
export declare const QCardDocs: QComponentDocs;
|
|
3
|
+
export declare const QCardSectionDocs: QComponentDocs;
|
|
4
|
+
export declare const QCardActionsDocs: QComponentDocs;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QCardActionsDocsProps, QCardDocsProps, QCardSectionDocsProps } from "./docs.props";
|
|
2
|
-
export
|
|
2
|
+
export const QCardDocs = {
|
|
3
3
|
name: "QCard",
|
|
4
4
|
description: "Cards provide a clean, flexible, and convenient means of displaying a wide variety of content.",
|
|
5
5
|
docs: {
|
|
@@ -14,7 +14,7 @@ export let QCardDocs = {
|
|
|
14
14
|
events: [],
|
|
15
15
|
},
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export const QCardSectionDocs = {
|
|
18
18
|
name: "QCardSection",
|
|
19
19
|
description: "Sections are used to group similar content within a card.",
|
|
20
20
|
docs: {
|
|
@@ -29,7 +29,7 @@ export let QCardSectionDocs = {
|
|
|
29
29
|
events: [],
|
|
30
30
|
},
|
|
31
31
|
};
|
|
32
|
-
export
|
|
32
|
+
export const QCardActionsDocs = {
|
|
33
33
|
name: "QCardActions",
|
|
34
34
|
description: "Actions hold actionable items like buttons within a card.",
|
|
35
35
|
docs: {
|
|
@@ -2,11 +2,7 @@
|
|
|
2
2
|
export { userClasses as class };
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
|
-
<label
|
|
6
|
-
class="q-checkbox {userClasses}"
|
|
7
|
-
class:q-checkbox--disabled={disable}
|
|
8
|
-
{...$$restProps}
|
|
9
|
-
>
|
|
5
|
+
<label class="q-checkbox {userClasses}" class:q-checkbox--disabled={disable} {...$$restProps}>
|
|
10
6
|
<input type="checkbox" bind:checked={value} disabled={disable} />
|
|
11
7
|
<span>{label}</span>
|
|
12
8
|
</label>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { QComponentDocs } from "../../utils";
|
|
2
|
-
export declare
|
|
2
|
+
export declare const QCheckboxDocs: QComponentDocs;
|
|
@@ -30,7 +30,10 @@ function onKeyDown(e) {
|
|
|
30
30
|
|
|
31
31
|
<a
|
|
32
32
|
bind:this={qChip}
|
|
33
|
-
use:ripple={{
|
|
33
|
+
use:ripple={{
|
|
34
|
+
disable: noRipple || disable,
|
|
35
|
+
color: outlined ? undefined : "var(--on-secondary)",
|
|
36
|
+
}}
|
|
34
37
|
aria-disabled={disable || undefined}
|
|
35
38
|
class="q-chip {sizeObj.class && sizeObj.class !== 'md'
|
|
36
39
|
? `q-chip--${sizeObj.class}`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { QComponentDocs } from "../../utils";
|
|
2
|
-
export declare
|
|
2
|
+
export declare const QChipDocs: QComponentDocs;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QChipDocsProps } from "./docs.props";
|
|
2
|
-
export
|
|
2
|
+
export const QChipDocs = {
|
|
3
3
|
name: "QChip",
|
|
4
4
|
description: "Chips help people enter information, make selections, filter content, or trigger actions. They represent options in a specific context, unlike buttons, which are persistent.",
|
|
5
5
|
docs: {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script>import Highlight from "svelte-highlight";
|
|
2
|
+
import { HighlightSvelte } from "svelte-highlight";
|
|
2
3
|
import typescript from "svelte-highlight/languages/typescript";
|
|
4
|
+
import "svelte-highlight/styles/material.css";
|
|
3
5
|
import { copy } from "../../utils";
|
|
4
6
|
import { QBtn } from "../..";
|
|
5
7
|
export let language, code = "/* No code found */", title = void 0, copiable = void 0;
|
|
@@ -22,7 +24,7 @@ function setBtn(type) {
|
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
async function copyCode() {
|
|
25
|
-
await copy(code).catch((
|
|
27
|
+
await copy(code).catch(() => {
|
|
26
28
|
setBtn("error");
|
|
27
29
|
setTimeout(() => setBtn("base"), 3e3);
|
|
28
30
|
});
|
|
@@ -52,21 +54,15 @@ async function copyCode() {
|
|
|
52
54
|
{:else if title}
|
|
53
55
|
<h4>{title}</h4>
|
|
54
56
|
{/if}
|
|
55
|
-
|
|
57
|
+
{#if language === "ts"}
|
|
58
|
+
<Highlight language={typescript} {code} />
|
|
59
|
+
{:else}
|
|
60
|
+
<HighlightSvelte {code} />
|
|
61
|
+
{/if}
|
|
56
62
|
</div>
|
|
57
63
|
|
|
58
64
|
<style>
|
|
59
65
|
.q-code-block {
|
|
60
66
|
border-radius: 0.5em;
|
|
61
67
|
}
|
|
62
|
-
|
|
63
|
-
pre {
|
|
64
|
-
max-height: 400px;
|
|
65
|
-
height: 100%;
|
|
66
|
-
margin: 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
code {
|
|
70
|
-
white-space: pre-wrap;
|
|
71
|
-
}
|
|
72
68
|
</style>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
|
|
2
|
-
// @quaffHash
|
|
2
|
+
// @quaffHash ef59d69362e560f4bed408a966ab4acc
|
|
3
3
|
export const QCodeBlockDocsProps = [
|
|
4
4
|
{
|
|
5
5
|
name: "language",
|
|
6
|
-
type: "
|
|
6
|
+
type: '"ts" | "svelte"',
|
|
7
7
|
optional: false,
|
|
8
8
|
clickableType: false,
|
|
9
9
|
description: "Language to use for highlighting.",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { QComponentDocs } from "../../utils";
|
|
2
|
-
export declare
|
|
2
|
+
export declare const QDialogDocs: QComponentDocs;
|
|
@@ -4,13 +4,10 @@ import { clickOutside } from "../../helpers";
|
|
|
4
4
|
import { createClasses, createStyles } from "../../utils";
|
|
5
5
|
import { getContext } from "svelte";
|
|
6
6
|
import { derived } from "svelte/store";
|
|
7
|
-
export let value = false, side = "left", width = 300,
|
|
7
|
+
export let value = false, side = "left", width = 300, bordered = false, overlay = false, persistent = false, userClasses = void 0, userStyles = void 0;
|
|
8
8
|
export { userClasses as class, userStyles as style };
|
|
9
9
|
$:
|
|
10
10
|
canHideOnClickOutside = value === true && persistent === false || overlay === true;
|
|
11
|
-
$:
|
|
12
|
-
belowBreakpoint = behavior === "mobile" === true || behavior !== "desktop" && /** TODO: Get Layout width */
|
|
13
|
-
1300 <= breakpoint;
|
|
14
11
|
$:
|
|
15
12
|
widthStyle = !$ctx && useSize(width).style;
|
|
16
13
|
$:
|
|
@@ -6,16 +6,9 @@ declare const __propDef: {
|
|
|
6
6
|
value?: QDrawerProps["value"];
|
|
7
7
|
side?: QDrawerProps["side"];
|
|
8
8
|
width?: QDrawerProps["width"];
|
|
9
|
-
breakpoint?: QDrawerProps["breakpoint"];
|
|
10
|
-
showIfAbove?: QDrawerProps["showIfAbove"];
|
|
11
|
-
behavior?: QDrawerProps["behavior"];
|
|
12
9
|
bordered?: QDrawerProps["bordered"];
|
|
13
|
-
elevated?: QDrawerProps["elevated"];
|
|
14
10
|
overlay?: QDrawerProps["overlay"];
|
|
15
11
|
persistent?: QDrawerProps["persistent"];
|
|
16
|
-
noSwipeOpen?: QDrawerProps["noSwipeOpen"];
|
|
17
|
-
noSwipeClose?: QDrawerProps["noSwipeClose"];
|
|
18
|
-
noSwipeBackdrop?: QDrawerProps["noSwipeBackdrop"];
|
|
19
12
|
class?: string | null | undefined;
|
|
20
13
|
style?: string | null | undefined;
|
|
21
14
|
show?: ((e?: MouseEvent) => void) | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { QComponentDocs } from "../../utils";
|
|
2
|
-
export declare
|
|
2
|
+
export declare const QDrawerDocs: QComponentDocs;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { QComponentDocs } from "../../utils";
|
|
2
|
-
export declare
|
|
2
|
+
export declare const QFooterDocs: QComponentDocs;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { QComponentDocs } from "../../utils";
|
|
2
|
-
export declare
|
|
2
|
+
export declare const QIconDocs: QComponentDocs;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
|
|
2
|
-
// @quaffHash
|
|
2
|
+
// @quaffHash 3f17452783c0d6c46d1ec71661554ebd
|
|
3
3
|
export const QIconDocsProps = [
|
|
4
4
|
{
|
|
5
5
|
name: "size",
|
|
@@ -51,9 +51,9 @@ export const QIconDocsProps = [
|
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
name: "imgAttributes",
|
|
54
|
-
type: "
|
|
54
|
+
type: "HTMLImgAttributes",
|
|
55
55
|
optional: true,
|
|
56
|
-
clickableType:
|
|
56
|
+
clickableType: false,
|
|
57
57
|
description: 'Additional attributes for the image element when using the `img` prop, as for example the "alt" attribute.',
|
|
58
58
|
default: "{}",
|
|
59
59
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CssValue, NativeProps, QuaffSizes } from "../../utils";
|
|
2
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
+
import type { HTMLAttributes, HTMLImgAttributes } from "svelte/elements";
|
|
3
3
|
export type QIconSizeOptions = QuaffSizes | CssValue | number;
|
|
4
4
|
export type QIconTypeOptions = "outlined" | "sharp" | "rounded";
|
|
5
5
|
export interface QIconProps extends NativeProps, HTMLAttributes<HTMLElement> {
|
|
@@ -37,7 +37,7 @@ export interface QIconProps extends NativeProps, HTMLAttributes<HTMLElement> {
|
|
|
37
37
|
* Additional attributes for the image element when using the `img` prop, as for example the "alt" attribute.
|
|
38
38
|
* @default {}
|
|
39
39
|
*/
|
|
40
|
-
imgAttributes?:
|
|
40
|
+
imgAttributes?: HTMLImgAttributes;
|
|
41
41
|
/**
|
|
42
42
|
* The color of the icon.
|
|
43
43
|
* @default undefined
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { QComponentDocs } from "../../utils";
|
|
2
|
-
export declare
|
|
2
|
+
export declare const QInputDocs: QComponentDocs;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const QInputDocs = {
|
|
2
2
|
name: "QInput",
|
|
3
3
|
description: "QInput is a form component that allows users to input text. It supports different visual styles such as filled, outlined, and rounded, and it can also display hint text and custom error messages.",
|
|
4
4
|
docs: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { QComponentDocs } from "../../utils";
|
|
2
|
-
export declare
|
|
2
|
+
export declare const QLayoutDocs: QComponentDocs;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QLayoutDocsProps } from "./docs.props";
|
|
2
|
-
export
|
|
2
|
+
export const QLayoutDocs = {
|
|
3
3
|
name: "QLayout",
|
|
4
4
|
description: "The QLayout component is designed to be the skeleton of the entire page, with navigational elements such as header, railbars, drawers and footer. This component is not mandatory but it really helps structure the page.",
|
|
5
5
|
docs: {
|
|
@@ -9,10 +9,7 @@ $:
|
|
|
9
9
|
}
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
|
-
<div
|
|
13
|
-
class="q-item__section q-item__section--{type} {userClasses}"
|
|
14
|
-
{...$$restProps}
|
|
15
|
-
>
|
|
12
|
+
<div class="q-item__section q-item__section--{type} {userClasses}" {...$$restProps}>
|
|
16
13
|
{#if type === "content"}
|
|
17
14
|
{#if ![$$slots.headline, $$slots.line2, $$slots.line2, $$slots.line3].some(Boolean)}
|
|
18
15
|
<slot />
|
|
@@ -7,15 +7,16 @@ $:
|
|
|
7
7
|
setContext("separator", separator === true ? separatorOptions : void 0);
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
|
-
<svelte:element
|
|
11
|
-
this={tag}
|
|
10
|
+
<svelte:element
|
|
11
|
+
this={tag}
|
|
12
12
|
class="q-list {userClasses}"
|
|
13
13
|
class:q-list--bordered={bordered}
|
|
14
14
|
class:q-list--rounded={roundedBorders}
|
|
15
15
|
class:q-list--dense={dense}
|
|
16
16
|
class:q-py-sm={padding}
|
|
17
|
-
{...$$restProps}
|
|
18
|
-
bind:this={listElement}
|
|
19
|
-
on:scroll
|
|
17
|
+
{...$$restProps}
|
|
18
|
+
bind:this={listElement}
|
|
19
|
+
on:scroll
|
|
20
|
+
>
|
|
20
21
|
<slot />
|
|
21
22
|
</svelte:element>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { QComponentDocs } from "../../utils";
|
|
2
|
-
export declare
|
|
2
|
+
export declare const QListDocs: QComponentDocs;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UseRouterLinkProps } from "../../composables/
|
|
1
|
+
import type { UseRouterLinkProps } from "../../composables/useRouterLink";
|
|
2
2
|
import type { QSeparatorProps } from "../separator/props";
|
|
3
3
|
import type { HTMLAnchorAttributes, HTMLAttributes } from "svelte/elements";
|
|
4
4
|
import type { NativeProps } from "../../utils";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NativePropsDefaults } from "../../utils";
|
|
2
|
-
import { UseRouterLinkPropsDefaults } from "../../composables/
|
|
2
|
+
import { UseRouterLinkPropsDefaults } from "../../composables/useRouterLink";
|
|
3
3
|
export const QListPropsDefaults = {
|
|
4
4
|
bordered: false,
|
|
5
5
|
roundedBorders: false,
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
} from "../..";
|
|
13
13
|
import { capitalize } from "../../utils";
|
|
14
14
|
import Types from "../../utils/types.json";
|
|
15
|
-
export let
|
|
16
|
-
let api =
|
|
15
|
+
export let componentDocs;
|
|
16
|
+
let api = componentDocs.map(() => "props");
|
|
17
17
|
let drawer = Object.fromEntries(
|
|
18
|
-
|
|
18
|
+
componentDocs.map((doc) => [
|
|
19
19
|
doc.name,
|
|
20
20
|
Object.fromEntries(
|
|
21
21
|
doc.docs.props.map((prop) => [prop.name, prop.clickableType ? false : void 0])
|
|
@@ -53,7 +53,7 @@ function handleDrawer(QDocument, doc, e) {
|
|
|
53
53
|
}
|
|
54
54
|
</script>
|
|
55
55
|
|
|
56
|
-
{#each
|
|
56
|
+
{#each componentDocs as QDocument, index}
|
|
57
57
|
<QCard class="q-px-none q-pb-none q-mt-lg">
|
|
58
58
|
<div slot="title" class="flex justify-between items-center q-px-md">
|
|
59
59
|
<h5 class="no-margin">
|
|
@@ -92,7 +92,7 @@ function handleDrawer(QDocument, doc, e) {
|
|
|
92
92
|
{#if isProp(doc, index)}
|
|
93
93
|
{doc.optional ? "?" : ""}
|
|
94
94
|
{#if doc.clickableType === true}
|
|
95
|
-
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
95
|
+
<!-- svelte-ignore a11y-click-events-have-key-events a11y-no-static-element-interactions -->
|
|
96
96
|
<span
|
|
97
97
|
class="prop-type clickable"
|
|
98
98
|
on:click={(e) => isProp(doc, index) && handleDrawer(QDocument, doc, e)}
|
|
@@ -113,6 +113,7 @@ function handleDrawer(QDocument, doc, e) {
|
|
|
113
113
|
</span>
|
|
114
114
|
</div>
|
|
115
115
|
<div slot="line1" class="q-mt-sm prop-description" style="white-space: normal;">
|
|
116
|
+
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
|
116
117
|
{@html doc.description}
|
|
117
118
|
</div>
|
|
118
119
|
</QItemSection>
|
|
@@ -130,8 +131,14 @@ function handleDrawer(QDocument, doc, e) {
|
|
|
130
131
|
color: var(--primary);
|
|
131
132
|
}
|
|
132
133
|
|
|
133
|
-
.
|
|
134
|
-
|
|
134
|
+
.prop-type {
|
|
135
|
+
opacity: 0.75;
|
|
136
|
+
}
|
|
137
|
+
.prop-type.clickable {
|
|
138
|
+
cursor: pointer;
|
|
139
|
+
}
|
|
140
|
+
.prop-type.clickable:hover {
|
|
141
|
+
opacity: 1;
|
|
135
142
|
}
|
|
136
143
|
|
|
137
144
|
:global(.q-drawer.api-drawer pre) {
|