@quaffui/quaff 0.1.0-prealpha11 → 0.1.0-prealpha12
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.d.ts +2 -2
- package/dist/components/avatar/props.d.ts +2 -1
- package/dist/components/breadcrumbs/QBreadcrumbs.svelte.d.ts +1 -1
- package/dist/components/breadcrumbs/QBreadcrumbsEl.svelte.d.ts +1 -1
- package/dist/components/breadcrumbs/props.d.ts +3 -2
- package/dist/components/button/QBtn.svelte +2 -2
- package/dist/components/button/QBtn.svelte.d.ts +2 -1
- package/dist/components/button/props.d.ts +12 -1
- package/dist/components/card/QCard.svelte.d.ts +1 -1
- package/dist/components/card/QCardActions.svelte.d.ts +1 -1
- package/dist/components/card/QCardSection.svelte.d.ts +1 -1
- package/dist/components/card/props.d.ts +4 -3
- package/dist/components/checkbox/QCheckbox.svelte.d.ts +1 -1
- package/dist/components/checkbox/props.d.ts +2 -1
- package/dist/components/chip/QChip.svelte.d.ts +1 -1
- package/dist/components/chip/props.d.ts +2 -1
- package/dist/components/codeBlock/props.d.ts +2 -1
- package/dist/components/dialog/QDialog.svelte.d.ts +1 -1
- package/dist/components/dialog/props.d.ts +2 -1
- package/dist/components/drawer/QDrawer.svelte.d.ts +2 -2
- package/dist/components/drawer/props.d.ts +2 -1
- package/dist/components/footer/QFooter.svelte.d.ts +2 -2
- package/dist/components/footer/props.d.ts +2 -1
- package/dist/components/header/QHeader.svelte.d.ts +2 -2
- package/dist/components/header/props.d.ts +2 -2
- package/dist/components/icon/QIcon.svelte +1 -1
- package/dist/components/icon/QIcon.svelte.d.ts +3 -2
- package/dist/components/icon/props.d.ts +2 -1
- package/dist/components/input/QInput.svelte.d.ts +1 -1
- package/dist/components/input/props.d.ts +2 -1
- package/dist/components/layout/QLayout.svelte +1 -1
- package/dist/components/layout/QLayout.svelte.d.ts +3 -2
- package/dist/components/layout/index.scss +8 -4
- package/dist/components/layout/props.d.ts +2 -1
- package/dist/components/list/QItem.svelte +22 -19
- package/dist/components/list/QItem.svelte.d.ts +4 -7
- package/dist/components/list/QItemSection.svelte +23 -19
- package/dist/components/list/QItemSection.svelte.d.ts +1 -1
- package/dist/components/list/QList.svelte +9 -10
- package/dist/components/list/QList.svelte.d.ts +1 -1
- package/dist/components/list/index.scss +27 -5
- package/dist/components/list/props.d.ts +8 -5
- package/dist/components/list/props.js +1 -1
- package/dist/components/progress/QCircularProgress.svelte +7 -1
- package/dist/components/progress/QCircularProgress.svelte.d.ts +2 -1
- package/dist/components/progress/QLinearProgress.svelte.d.ts +2 -2
- package/dist/components/progress/props.d.ts +3 -2
- package/dist/components/radio/QRadio.svelte.d.ts +1 -1
- package/dist/components/radio/props.d.ts +2 -1
- package/dist/components/railbar/QRailbar.svelte.d.ts +2 -2
- package/dist/components/railbar/props.d.ts +2 -1
- package/dist/components/select/QSelect.svelte +4 -2
- package/dist/components/select/QSelect.svelte.d.ts +1 -1
- package/dist/components/select/props.d.ts +6 -2
- package/dist/components/separator/QSeparator.svelte +2 -2
- package/dist/components/separator/QSeparator.svelte.d.ts +3 -2
- package/dist/components/separator/props.d.ts +2 -1
- package/dist/components/table/QTable.svelte +1 -1
- package/dist/components/table/QTable.svelte.d.ts +2 -1
- package/dist/components/table/props.d.ts +2 -1
- package/dist/components/tabs/QTab.svelte.d.ts +1 -1
- package/dist/components/tabs/QTabs.svelte.d.ts +2 -2
- package/dist/components/tabs/index.scss +3 -2
- package/dist/components/tabs/props.d.ts +3 -2
- package/dist/components/toggle/QToggle.svelte +9 -1
- package/dist/components/toggle/QToggle.svelte.d.ts +1 -1
- package/dist/components/toolbar/QToolbar.svelte.d.ts +2 -2
- package/dist/components/toolbar/QToolbarTitle.svelte.d.ts +2 -2
- package/dist/components/toolbar/props.d.ts +3 -2
- package/dist/components/tooltip/QTooltip.svelte.d.ts +1 -1
- package/dist/components/tooltip/props.d.ts +2 -1
- package/dist/composables/use-router-link.d.ts +2 -2
- package/dist/composables/use-router-link.js +2 -2
- package/dist/css/index.css +1 -1
- package/dist/css/ripple.scss +1 -1
- package/dist/css/theme/theme.dark.scss +3 -1
- package/dist/css/theme/theme.light.scss +3 -1
- package/dist/helpers/ripple.d.ts +1 -0
- 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/Quaff.js +18 -13
- package/dist/utils/props.d.ts +1 -1
- package/dist/utils/types.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import { createClasses } from "../../utils/props";
|
|
1
|
+
<script>import { createClasses } from "../../utils/props";
|
|
3
2
|
import { onMount, setContext } from "svelte";
|
|
4
3
|
export let bordered = false, roundedBorders = false, dense = false, separator = false, separatorOptions = {}, padding = false, tag = "div", userClasses = void 0;
|
|
5
4
|
export { userClasses as class };
|
|
@@ -8,14 +7,14 @@ onMount(() => listElement.querySelector(".q-separator__wrapper:first-child")?.re
|
|
|
8
7
|
$:
|
|
9
8
|
setContext("separator", separator === true ? separatorOptions : void 0);
|
|
10
9
|
$:
|
|
11
|
-
classes = createClasses(
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
classes = createClasses(
|
|
11
|
+
[bordered && "bordered", dense && "dense", roundedBorders && "rounded"],
|
|
12
|
+
{
|
|
13
|
+
component: "q-list",
|
|
14
|
+
quaffClasses: [padding && "q-py-sm"],
|
|
15
|
+
userClasses
|
|
16
|
+
}
|
|
17
|
+
);
|
|
19
18
|
</script>
|
|
20
19
|
|
|
21
20
|
<svelte:element this={tag} class={classes} {...$$restProps} bind:this={listElement} on:scroll>
|
|
@@ -5,11 +5,15 @@
|
|
|
5
5
|
justify-content: center;
|
|
6
6
|
width: 100%;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
&--bordered {
|
|
9
|
+
@include border;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&--rounded {
|
|
9
13
|
border-radius: 0.25rem;
|
|
10
14
|
}
|
|
11
15
|
|
|
12
|
-
|
|
16
|
+
&--dense {
|
|
13
17
|
min-height: 32px;
|
|
14
18
|
padding-block: 0;
|
|
15
19
|
|
|
@@ -43,10 +47,28 @@
|
|
|
43
47
|
width: 40px;
|
|
44
48
|
}
|
|
45
49
|
|
|
46
|
-
&.
|
|
50
|
+
&.q-link {
|
|
47
51
|
padding: 8px 24px 8px 16px;
|
|
48
52
|
|
|
49
|
-
|
|
53
|
+
&:is(:hover, :focus):not([aria-disabled])::after {
|
|
54
|
+
content: "";
|
|
55
|
+
position: absolute;
|
|
56
|
+
top: 0;
|
|
57
|
+
left: 0;
|
|
58
|
+
width: 100%;
|
|
59
|
+
height: 100%;
|
|
60
|
+
background-color: var(--on-surface);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&:hover:not([aria-disabled])::after {
|
|
64
|
+
opacity: 0.08;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:focus:not([aria-disabled])::after {
|
|
68
|
+
opacity: 0.16;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.q-item--multiline {
|
|
50
72
|
padding-block: 12px;
|
|
51
73
|
}
|
|
52
74
|
|
|
@@ -55,7 +77,7 @@
|
|
|
55
77
|
}
|
|
56
78
|
}
|
|
57
79
|
|
|
58
|
-
|
|
80
|
+
&--multiline {
|
|
59
81
|
padding-block: 12px;
|
|
60
82
|
|
|
61
83
|
&
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type NativeProps } from "../../utils/types";
|
|
2
|
+
import type { UseRouterLinkProps } from "../../composables/use-router-link";
|
|
2
3
|
import type { QSeparatorProps } from "../separator/props";
|
|
3
|
-
import {
|
|
4
|
-
export interface QListProps extends NativeProps {
|
|
4
|
+
import type { HTMLAnchorAttributes, HTMLAttributes } from "svelte/elements";
|
|
5
|
+
export interface QListProps extends NativeProps, HTMLAttributes<HTMLElement> {
|
|
5
6
|
bordered?: boolean;
|
|
6
7
|
roundedBorders?: boolean;
|
|
7
8
|
dense?: boolean;
|
|
@@ -18,16 +19,18 @@ export interface QListProps extends NativeProps {
|
|
|
18
19
|
tag?: string;
|
|
19
20
|
}
|
|
20
21
|
export declare const QListPropsDefaults: QListProps;
|
|
21
|
-
export interface QItemProps extends UseRouterLinkProps, NativeProps {
|
|
22
|
+
export interface QItemProps extends UseRouterLinkProps, NativeProps, HTMLAttributes<HTMLElement> {
|
|
22
23
|
tag?: string;
|
|
23
24
|
active?: boolean;
|
|
24
25
|
clickable?: boolean;
|
|
25
26
|
dense?: boolean;
|
|
26
|
-
|
|
27
|
+
noRipple?: boolean;
|
|
28
|
+
tabindex?: HTMLAttributes<HTMLElement>["tabindex"];
|
|
29
|
+
target?: HTMLAnchorAttributes["target"];
|
|
27
30
|
}
|
|
28
31
|
export declare const QItemPropsDefaults: QItemProps;
|
|
29
32
|
export type QItemSectionTypes = "thumbnail" | "video" | "avatar" | "toggle" | "icon" | "trailingIcon" | "trailingText" | "content";
|
|
30
|
-
export interface QItemSectionProps extends NativeProps {
|
|
33
|
+
export interface QItemSectionProps extends NativeProps, HTMLAttributes<HTMLDivElement> {
|
|
31
34
|
type?: QItemSectionTypes;
|
|
32
35
|
}
|
|
33
36
|
export declare const QItemSectionPropsDefaults: QItemSectionProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NativePropsDefaults } from "../../utils/types";
|
|
2
|
-
import { UseRouterLinkPropsDefaults
|
|
2
|
+
import { UseRouterLinkPropsDefaults } from "../../composables/use-router-link";
|
|
3
3
|
export const QListPropsDefaults = {
|
|
4
4
|
bordered: false,
|
|
5
5
|
roundedBorders: false,
|
|
@@ -13,7 +13,13 @@ $:
|
|
|
13
13
|
});
|
|
14
14
|
</script>
|
|
15
15
|
|
|
16
|
-
<svg
|
|
16
|
+
<svg
|
|
17
|
+
class={classes}
|
|
18
|
+
height={spinnerSize.style}
|
|
19
|
+
width={spinnerSize.style}
|
|
20
|
+
viewBox="25 25 50 50"
|
|
21
|
+
{...$$restProps}
|
|
22
|
+
>
|
|
17
23
|
<circle
|
|
18
24
|
class="path"
|
|
19
25
|
cx="50"
|
|
@@ -2,12 +2,13 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
import type { QCircularProgressProps } from "./props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
+
[x: string]: any;
|
|
5
6
|
value?: number | undefined;
|
|
6
7
|
indeterminate?: QCircularProgressProps["indeterminate"];
|
|
7
8
|
size?: QCircularProgressProps["size"];
|
|
8
9
|
color?: QCircularProgressProps["color"];
|
|
9
10
|
thickness?: QCircularProgressProps["thickness"];
|
|
10
|
-
class?: string | undefined;
|
|
11
|
+
class?: string | null | undefined;
|
|
11
12
|
};
|
|
12
13
|
events: {
|
|
13
14
|
[evt: string]: CustomEvent<any>;
|
|
@@ -6,8 +6,8 @@ declare const __propDef: {
|
|
|
6
6
|
value?: number | undefined;
|
|
7
7
|
from?: QLinearProgressProps["from"];
|
|
8
8
|
rounded?: QLinearProgressProps["rounded"];
|
|
9
|
-
class?: string | undefined;
|
|
10
|
-
style?: string | undefined;
|
|
9
|
+
class?: string | null | undefined;
|
|
10
|
+
style?: string | null | undefined;
|
|
11
11
|
};
|
|
12
12
|
events: {
|
|
13
13
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { NativeProps, CssValue } from "../../utils/types";
|
|
2
|
-
|
|
2
|
+
import type { HTMLAttributes, SVGAttributes } from "svelte/elements";
|
|
3
|
+
export interface QLinearProgressProps extends NativeProps, HTMLAttributes<HTMLDivElement> {
|
|
3
4
|
/**
|
|
4
5
|
* @default 0
|
|
5
6
|
*/
|
|
@@ -13,7 +14,7 @@ export interface QLinearProgressProps extends NativeProps {
|
|
|
13
14
|
*/
|
|
14
15
|
rounded?: boolean;
|
|
15
16
|
}
|
|
16
|
-
export interface QCircularProgressProps extends NativeProps {
|
|
17
|
+
export interface QCircularProgressProps extends NativeProps, SVGAttributes<SVGSVGElement> {
|
|
17
18
|
/**
|
|
18
19
|
* @default 0
|
|
19
20
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { NativeProps } from "../../utils/types";
|
|
2
|
-
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
export interface QRadioProps extends NativeProps, HTMLAttributes<HTMLLabelElement> {
|
|
3
4
|
value: string;
|
|
4
5
|
label?: string;
|
|
5
6
|
selected?: any;
|
|
@@ -5,8 +5,8 @@ declare const __propDef: {
|
|
|
5
5
|
width?: QRailbarProps["width"];
|
|
6
6
|
side?: QRailbarProps["side"];
|
|
7
7
|
bordered?: QRailbarProps["bordered"];
|
|
8
|
-
class?: string | undefined;
|
|
9
|
-
style?: string | undefined;
|
|
8
|
+
class?: string | null | undefined;
|
|
9
|
+
style?: string | null | undefined;
|
|
10
10
|
};
|
|
11
11
|
events: {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { NativeProps, CssValue } from "../../utils/types";
|
|
2
|
-
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
export interface QRailbarProps extends NativeProps, HTMLAttributes<HTMLElement> {
|
|
3
4
|
/**
|
|
4
5
|
* @default 88px
|
|
5
6
|
*/
|
|
@@ -7,7 +7,7 @@ export let options, multiple = false, bordered = false, dense = false, disable =
|
|
|
7
7
|
export { userClasses as class };
|
|
8
8
|
let active = false;
|
|
9
9
|
$:
|
|
10
|
-
active = value?.length > 0;
|
|
10
|
+
active = typeof value === "number" || value?.length > 0;
|
|
11
11
|
$:
|
|
12
12
|
hasBorder = bordered || rounded || outlined;
|
|
13
13
|
$:
|
|
@@ -89,7 +89,9 @@ function select(evt, option) {
|
|
|
89
89
|
if (multiple) {
|
|
90
90
|
const hasItem = value.some((entry) => entry === optionValue);
|
|
91
91
|
if (hasItem) {
|
|
92
|
-
value = value.filter(
|
|
92
|
+
value = value.filter(
|
|
93
|
+
(val) => val !== optionValue
|
|
94
|
+
);
|
|
93
95
|
} else {
|
|
94
96
|
value = [...value, optionValue];
|
|
95
97
|
}
|
|
@@ -16,7 +16,7 @@ declare const __propDef: {
|
|
|
16
16
|
outlined?: QSelectProps["outlined"];
|
|
17
17
|
rounded?: QSelectProps["rounded"];
|
|
18
18
|
value: QSelectProps["value"];
|
|
19
|
-
class?: string | undefined;
|
|
19
|
+
class?: string | null | undefined;
|
|
20
20
|
};
|
|
21
21
|
events: {
|
|
22
22
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { NativeProps } from "../../utils/types";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
3
|
export type QSelectOption = string | {
|
|
3
4
|
label: string;
|
|
4
5
|
value: string;
|
|
5
6
|
};
|
|
6
|
-
export
|
|
7
|
-
|
|
7
|
+
export type QSelectValue = QSelectSingleValue | QSelectMultipleValue;
|
|
8
|
+
export type QSelectSingleValue = string | number;
|
|
9
|
+
export type QSelectMultipleValue = QSelectSingleValue[];
|
|
10
|
+
export interface QSelectProps extends NativeProps, HTMLAttributes<HTMLDivElement> {
|
|
11
|
+
value: QSelectValue;
|
|
8
12
|
multiple?: boolean;
|
|
9
13
|
options: QSelectOption[];
|
|
10
14
|
bordered?: boolean;
|
|
@@ -41,7 +41,7 @@ $:
|
|
|
41
41
|
</script>
|
|
42
42
|
|
|
43
43
|
{#if text !== undefined}
|
|
44
|
-
<div class="q-separator__wrapper" style={containerStyle}>
|
|
44
|
+
<div class="q-separator__wrapper" style={containerStyle} {...$$restProps}>
|
|
45
45
|
{#if (vertical === true && textAlign !== "top") || (vertical === false && textAlign !== "left")}
|
|
46
46
|
<hr class={classes} {style} aria-orientation={orientationClass} />
|
|
47
47
|
{/if}
|
|
@@ -51,7 +51,7 @@ $:
|
|
|
51
51
|
{/if}
|
|
52
52
|
</div>
|
|
53
53
|
{:else}
|
|
54
|
-
<div class="q-separator__wrapper" style={containerStyle}>
|
|
54
|
+
<div class="q-separator__wrapper" style={containerStyle} {...$$restProps}>
|
|
55
55
|
<hr class={classes} {style} aria-orientation={orientationClass} />
|
|
56
56
|
</div>
|
|
57
57
|
{/if}
|
|
@@ -2,6 +2,7 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
import type { QSeparatorProps } from "./props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
+
[x: string]: any;
|
|
5
6
|
spacing?: QSeparatorProps["spacing"];
|
|
6
7
|
inset?: QSeparatorProps["inset"];
|
|
7
8
|
vertical?: QSeparatorProps["vertical"];
|
|
@@ -9,8 +10,8 @@ declare const __propDef: {
|
|
|
9
10
|
size?: QSeparatorProps["size"];
|
|
10
11
|
text?: QSeparatorProps["text"];
|
|
11
12
|
textAlign?: QSeparatorProps["textAlign"];
|
|
12
|
-
class?: string | undefined;
|
|
13
|
-
style?: string | undefined;
|
|
13
|
+
class?: string | null | undefined;
|
|
14
|
+
style?: string | null | undefined;
|
|
14
15
|
};
|
|
15
16
|
events: {
|
|
16
17
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { NativeProps } from "../../utils/types";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
3
|
interface QSeparatorPropsVertical extends NativeProps {
|
|
3
4
|
spacing?: "none" | "sm" | "md" | "lg";
|
|
4
5
|
inset?: boolean;
|
|
@@ -8,7 +9,7 @@ interface QSeparatorPropsVertical extends NativeProps {
|
|
|
8
9
|
text?: string;
|
|
9
10
|
textAlign?: "top" | "middle" | "bottom";
|
|
10
11
|
}
|
|
11
|
-
interface QSeparatorPropsHorizontal extends NativeProps {
|
|
12
|
+
interface QSeparatorPropsHorizontal extends NativeProps, HTMLAttributes<HTMLDivElement> {
|
|
12
13
|
spacing?: "none" | "sm" | "md" | "lg";
|
|
13
14
|
inset?: boolean;
|
|
14
15
|
vertical?: false;
|
|
@@ -3,12 +3,13 @@ import type { QTableProps } from "./props";
|
|
|
3
3
|
import type { QTableColumn, QTableRow } from "./props";
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
|
+
[x: string]: any;
|
|
6
7
|
columns?: QTableColumn[] | undefined;
|
|
7
8
|
rows?: QTableRow[] | undefined;
|
|
8
9
|
flat?: QTableProps["flat"];
|
|
9
10
|
bordered?: QTableProps["bordered"];
|
|
10
11
|
dense?: QTableProps["dense"];
|
|
11
|
-
class?: string | undefined;
|
|
12
|
+
class?: string | null | undefined;
|
|
12
13
|
};
|
|
13
14
|
events: {
|
|
14
15
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { NativeProps } from "../../utils/types";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
3
|
export type QTableColumn = {
|
|
3
4
|
name: string;
|
|
4
5
|
required?: boolean;
|
|
@@ -16,7 +17,7 @@ export type QTableSort = {
|
|
|
16
17
|
columnField: string | ((row: QTableRow) => string);
|
|
17
18
|
type: "asc" | "desc";
|
|
18
19
|
} | null;
|
|
19
|
-
export interface QTableProps extends NativeProps {
|
|
20
|
+
export interface QTableProps extends NativeProps, HTMLAttributes<HTMLDivElement> {
|
|
20
21
|
/**
|
|
21
22
|
* Column definitions of the table.
|
|
22
23
|
* @default []
|
|
@@ -5,8 +5,8 @@ declare const __propDef: {
|
|
|
5
5
|
value?: QTabsProps["value"];
|
|
6
6
|
variant?: QTabsProps["variant"];
|
|
7
7
|
round?: QTabsProps["round"];
|
|
8
|
-
class?: string | undefined;
|
|
9
|
-
style?: string | undefined;
|
|
8
|
+
class?: string | null | undefined;
|
|
9
|
+
style?: string | null | undefined;
|
|
10
10
|
};
|
|
11
11
|
events: {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
overflow: auto;
|
|
8
8
|
scroll-behavior: smooth;
|
|
9
9
|
border-radius: 0;
|
|
10
|
-
border-bottom: solid 0.0625rem var(--outline);
|
|
10
|
+
border-bottom: solid 0.0625rem var(--outline-4);
|
|
11
11
|
&::-webkit-scrollbar {
|
|
12
12
|
display: none;
|
|
13
13
|
}
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
border-radius: 0;
|
|
27
27
|
gap: 0;
|
|
28
28
|
overflow: hidden;
|
|
29
|
+
@include padding("x", "md");
|
|
29
30
|
|
|
30
31
|
& .q-tab__icon {
|
|
31
32
|
margin-right: 0.25rem;
|
|
@@ -62,7 +63,7 @@
|
|
|
62
63
|
width: fit-content;
|
|
63
64
|
align-items: stretch;
|
|
64
65
|
border-bottom: unset;
|
|
65
|
-
border-right: solid 0.0625rem var(--outline);
|
|
66
|
+
border-right: solid 0.0625rem var(--outline-4);
|
|
66
67
|
|
|
67
68
|
& > .q-tab {
|
|
68
69
|
@include padding("x", "md");
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { type NativeProps } from "../../utils/types";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
3
|
export type QTabsVariants = "primary" | "secondary" | "vertical";
|
|
3
|
-
export interface QTabsProps extends NativeProps {
|
|
4
|
+
export interface QTabsProps extends NativeProps, HTMLAttributes<HTMLElement> {
|
|
4
5
|
value?: string;
|
|
5
6
|
variant?: QTabsVariants;
|
|
6
7
|
round?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const QTabsPropsDefaults: QTabsProps;
|
|
9
|
-
export interface QTabProps extends NativeProps {
|
|
10
|
+
export interface QTabProps extends NativeProps, HTMLAttributes<HTMLElement> {
|
|
10
11
|
name?: string;
|
|
11
12
|
to?: string;
|
|
12
13
|
icon?: string;
|
|
@@ -18,7 +18,15 @@ function toggle() {
|
|
|
18
18
|
}
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
|
-
<div
|
|
21
|
+
<div
|
|
22
|
+
on:click={toggle}
|
|
23
|
+
class={classes}
|
|
24
|
+
aria-disabled={disable}
|
|
25
|
+
role="switch"
|
|
26
|
+
aria-checked={value}
|
|
27
|
+
tabindex="0"
|
|
28
|
+
{...$$restProps}
|
|
29
|
+
>
|
|
22
30
|
<label class={classesInner}>
|
|
23
31
|
<input bind:checked={value} type="checkbox" disabled={disable} />
|
|
24
32
|
<span>
|
|
@@ -7,8 +7,8 @@ declare const __propDef: {
|
|
|
7
7
|
border?: QToolbarProps["border"];
|
|
8
8
|
elevate?: QToolbarProps["elevate"];
|
|
9
9
|
height?: QToolbarProps["height"];
|
|
10
|
-
class?: string | undefined;
|
|
11
|
-
style?: string | undefined;
|
|
10
|
+
class?: string | null | undefined;
|
|
11
|
+
style?: string | null | undefined;
|
|
12
12
|
};
|
|
13
13
|
events: {
|
|
14
14
|
[evt: string]: CustomEvent<any>;
|
|
@@ -4,8 +4,8 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
shrink?: QToolbarTitleProps["shrink"];
|
|
7
|
-
class?: string | undefined;
|
|
8
|
-
style?: string | undefined;
|
|
7
|
+
class?: string | null | undefined;
|
|
8
|
+
style?: string | null | undefined;
|
|
9
9
|
};
|
|
10
10
|
events: {
|
|
11
11
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { NativeProps, CssValue } from "../../utils/types";
|
|
2
|
-
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
export interface QToolbarProps extends NativeProps, HTMLAttributes<HTMLElement> {
|
|
3
4
|
/**
|
|
4
5
|
* @default false
|
|
5
6
|
*/
|
|
@@ -17,7 +18,7 @@ export interface QToolbarProps extends NativeProps {
|
|
|
17
18
|
*/
|
|
18
19
|
height?: CssValue | number;
|
|
19
20
|
}
|
|
20
|
-
export interface QToolbarTitleProps extends NativeProps {
|
|
21
|
+
export interface QToolbarTitleProps extends NativeProps, HTMLAttributes<HTMLDivElement> {
|
|
21
22
|
/**
|
|
22
23
|
* @default false
|
|
23
24
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { NativeProps } from "../../utils/types";
|
|
2
|
-
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
export interface QTooltipProps extends NativeProps, HTMLAttributes<HTMLDivElement> {
|
|
3
4
|
value?: boolean;
|
|
4
5
|
position?: "top" | "right" | "bottom" | "left";
|
|
5
6
|
}
|
|
@@ -2,9 +2,9 @@ import type { Page } from "@sveltejs/kit";
|
|
|
2
2
|
export interface UseRouterLinkProps {
|
|
3
3
|
href?: string;
|
|
4
4
|
to?: string;
|
|
5
|
-
disable
|
|
5
|
+
disable?: boolean;
|
|
6
6
|
activeClass?: string;
|
|
7
|
-
replace
|
|
7
|
+
replace?: boolean;
|
|
8
8
|
}
|
|
9
9
|
export declare const UseRouterLinkPropsDefaults: UseRouterLinkProps;
|
|
10
10
|
export declare function isRouteActive(router: Page<Record<string, string>, string | null>, to: string | undefined): boolean;
|
|
@@ -12,11 +12,11 @@ export function isRouteActive(router, to) {
|
|
|
12
12
|
: router.url.pathname.slice(0, (to || "").length) === to;
|
|
13
13
|
}
|
|
14
14
|
export default function (props) {
|
|
15
|
-
const hasLink = props.to
|
|
15
|
+
const hasLink = [props.to, props.href].some((entry) => typeof entry !== "undefined");
|
|
16
16
|
const linkClasses = createClasses([hasLink && "q-link", props.disable && "disable"]);
|
|
17
17
|
const linkAttributes = {
|
|
18
18
|
href: props.to || props.href,
|
|
19
|
-
"data-sveltkit-reload": props.replace
|
|
19
|
+
"data-sveltkit-reload": props.replace ? "" : undefined,
|
|
20
20
|
};
|
|
21
21
|
return {
|
|
22
22
|
hasLink,
|