@quaffui/quaff 0.1.0-prealpha10 → 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 +2 -2
- package/dist/components/card/QCardSection.svelte.d.ts +1 -1
- package/dist/components/card/props.d.ts +5 -4
- 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 +8 -3
- 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 +7 -6
- package/dist/components/icon/props.d.ts +6 -5
- package/dist/components/input/QInput.svelte.d.ts +7 -7
- package/dist/components/input/props.d.ts +8 -7
- package/dist/components/layout/QLayout.svelte +1 -1
- package/dist/components/layout/QLayout.svelte.d.ts +10 -9
- package/dist/components/layout/index.scss +8 -4
- package/dist/components/layout/props.d.ts +9 -8
- package/dist/components/list/QItem.svelte +22 -19
- package/dist/components/list/QItem.svelte.d.ts +9 -12
- package/dist/components/list/QItemSection.svelte +23 -19
- package/dist/components/list/QItemSection.svelte.d.ts +2 -2
- package/dist/components/list/QList.svelte +9 -10
- package/dist/components/list/QList.svelte.d.ts +7 -14
- package/dist/components/list/index.scss +27 -5
- package/dist/components/list/props.d.ts +19 -16
- package/dist/components/list/props.js +1 -1
- package/dist/components/progress/QCircularProgress.svelte +7 -1
- package/dist/components/progress/QCircularProgress.svelte.d.ts +5 -4
- package/dist/components/progress/QLinearProgress.svelte.d.ts +4 -4
- package/dist/components/progress/props.d.ts +8 -7
- package/dist/components/radio/QRadio.svelte.d.ts +3 -3
- package/dist/components/radio/props.d.ts +5 -4
- package/dist/components/railbar/QRailbar.svelte.d.ts +5 -5
- package/dist/components/railbar/props.d.ts +5 -4
- package/dist/components/select/QSelect.svelte +4 -2
- package/dist/components/select/QSelect.svelte.d.ts +4 -4
- package/dist/components/select/props.d.ts +10 -6
- package/dist/components/select/props.js +0 -1
- package/dist/components/separator/QSeparator.svelte +2 -2
- package/dist/components/separator/QSeparator.svelte.d.ts +8 -7
- package/dist/components/separator/props.d.ts +11 -10
- package/dist/components/table/QTable.svelte +1 -1
- package/dist/components/table/QTable.svelte.d.ts +3 -2
- package/dist/components/table/props.d.ts +3 -2
- package/dist/components/tabs/QTab.svelte.d.ts +1 -1
- package/dist/components/tabs/QTabs.svelte.d.ts +4 -4
- package/dist/components/tabs/index.scss +3 -2
- package/dist/components/tabs/props.d.ts +5 -4
- 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 +6 -6
- package/dist/components/toolbar/QToolbarTitle.svelte.d.ts +3 -3
- package/dist/components/toolbar/props.d.ts +8 -7
- package/dist/components/tooltip/QTooltip.svelte.d.ts +2 -2
- package/dist/components/tooltip/props.d.ts +3 -2
- 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/palette.scss +18 -4
- 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/QTheme.d.ts +1 -2
- package/dist/stores/QTheme.js +22 -15
- 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,21 +1,22 @@
|
|
|
1
1
|
import type { NativeProps } from "../../utils/types";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
3
|
interface QSeparatorPropsVertical extends NativeProps {
|
|
3
|
-
spacing
|
|
4
|
-
inset
|
|
5
|
-
vertical
|
|
4
|
+
spacing?: "none" | "sm" | "md" | "lg";
|
|
5
|
+
inset?: boolean;
|
|
6
|
+
vertical?: true;
|
|
6
7
|
color?: string;
|
|
7
8
|
size: string;
|
|
8
9
|
text?: string;
|
|
9
|
-
textAlign
|
|
10
|
+
textAlign?: "top" | "middle" | "bottom";
|
|
10
11
|
}
|
|
11
|
-
interface QSeparatorPropsHorizontal extends NativeProps {
|
|
12
|
-
spacing
|
|
13
|
-
inset
|
|
14
|
-
vertical
|
|
12
|
+
interface QSeparatorPropsHorizontal extends NativeProps, HTMLAttributes<HTMLDivElement> {
|
|
13
|
+
spacing?: "none" | "sm" | "md" | "lg";
|
|
14
|
+
inset?: boolean;
|
|
15
|
+
vertical?: false;
|
|
15
16
|
color?: string;
|
|
16
|
-
size
|
|
17
|
+
size?: string;
|
|
17
18
|
text?: string;
|
|
18
|
-
textAlign
|
|
19
|
+
textAlign?: "left" | "center" | "right";
|
|
19
20
|
}
|
|
20
21
|
export type QSeparatorProps = QSeparatorPropsHorizontal | QSeparatorPropsVertical;
|
|
21
22
|
export declare const QSeparatorPropsDefaults: QSeparatorProps;
|
|
@@ -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
|
-
dense?:
|
|
11
|
-
class?: string | undefined;
|
|
11
|
+
dense?: QTableProps["dense"];
|
|
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 []
|
|
@@ -41,5 +42,5 @@ export interface QTableProps extends NativeProps {
|
|
|
41
42
|
* Shows the Table in dense mode (takes up less space).
|
|
42
43
|
* @default false
|
|
43
44
|
*/
|
|
44
|
-
dense
|
|
45
|
+
dense?: boolean;
|
|
45
46
|
}
|
|
@@ -3,10 +3,10 @@ import type { QTabsProps } from "./props";
|
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
value?: QTabsProps["value"];
|
|
6
|
-
variant?:
|
|
7
|
-
round?:
|
|
8
|
-
class?: string | undefined;
|
|
9
|
-
style?: string | undefined;
|
|
6
|
+
variant?: QTabsProps["variant"];
|
|
7
|
+
round?: QTabsProps["round"];
|
|
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
|
-
variant
|
|
6
|
-
round
|
|
6
|
+
variant?: QTabsVariants;
|
|
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>
|
|
@@ -3,12 +3,12 @@ import type { QToolbarProps } from "./props";
|
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
|
-
inset?:
|
|
7
|
-
border?:
|
|
8
|
-
elevate?:
|
|
9
|
-
height?:
|
|
10
|
-
class?: string | undefined;
|
|
11
|
-
style?: string | undefined;
|
|
6
|
+
inset?: QToolbarProps["inset"];
|
|
7
|
+
border?: QToolbarProps["border"];
|
|
8
|
+
elevate?: QToolbarProps["elevate"];
|
|
9
|
+
height?: QToolbarProps["height"];
|
|
10
|
+
class?: string | null | undefined;
|
|
11
|
+
style?: string | null | undefined;
|
|
12
12
|
};
|
|
13
13
|
events: {
|
|
14
14
|
[evt: string]: CustomEvent<any>;
|
|
@@ -3,9 +3,9 @@ import type { QToolbarTitleProps } from "./props";
|
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
|
-
shrink?:
|
|
7
|
-
class?: string | undefined;
|
|
8
|
-
style?: string | undefined;
|
|
6
|
+
shrink?: QToolbarTitleProps["shrink"];
|
|
7
|
+
class?: string | null | undefined;
|
|
8
|
+
style?: string | null | undefined;
|
|
9
9
|
};
|
|
10
10
|
events: {
|
|
11
11
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,25 +1,26 @@
|
|
|
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
|
*/
|
|
6
|
-
inset
|
|
7
|
+
inset?: boolean;
|
|
7
8
|
/**
|
|
8
9
|
* @default false
|
|
9
10
|
*/
|
|
10
|
-
border
|
|
11
|
+
border?: boolean;
|
|
11
12
|
/**
|
|
12
13
|
* @default false
|
|
13
14
|
*/
|
|
14
|
-
elevate
|
|
15
|
+
elevate?: boolean;
|
|
15
16
|
/**
|
|
16
17
|
* @default 64px
|
|
17
18
|
*/
|
|
18
|
-
height
|
|
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
|
*/
|
|
24
|
-
shrink
|
|
25
|
+
shrink?: boolean;
|
|
25
26
|
}
|
|
@@ -4,8 +4,8 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
value?: QTooltipProps["value"];
|
|
7
|
-
position?: "
|
|
8
|
-
class?: string | undefined;
|
|
7
|
+
position?: QTooltipProps["position"];
|
|
8
|
+
class?: string | null | undefined;
|
|
9
9
|
};
|
|
10
10
|
events: {
|
|
11
11
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,6 +1,7 @@
|
|
|
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
|
-
position
|
|
5
|
+
position?: "top" | "right" | "bottom" | "left";
|
|
5
6
|
}
|
|
6
7
|
export declare const QTooltipPropsDefaults: QTooltipProps;
|
|
@@ -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,
|