@quaffui/quaff 0.1.0-prealpha11 → 0.1.0-prealpha14
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 +2 -2
- package/dist/components/avatar/QAvatar.svelte.d.ts +2 -2
- package/dist/components/avatar/docs.d.ts +1 -1
- package/dist/components/avatar/props.d.ts +3 -2
- package/dist/components/breadcrumbs/QBreadcrumbs.svelte +1 -1
- package/dist/components/breadcrumbs/QBreadcrumbs.svelte.d.ts +1 -1
- package/dist/components/breadcrumbs/QBreadcrumbsEl.svelte +5 -5
- package/dist/components/breadcrumbs/QBreadcrumbsEl.svelte.d.ts +1 -1
- package/dist/components/breadcrumbs/docs.d.ts +1 -1
- package/dist/components/breadcrumbs/props.d.ts +4 -3
- package/dist/components/button/QBtn.svelte +14 -10
- package/dist/components/button/QBtn.svelte.d.ts +2 -1
- package/dist/components/button/docs.d.ts +1 -1
- package/dist/components/button/docs.props.js +16 -0
- package/dist/components/button/props.d.ts +13 -2
- package/dist/components/card/QCard.svelte +2 -2
- package/dist/components/card/QCard.svelte.d.ts +1 -1
- package/dist/components/card/QCardActions.svelte +2 -2
- package/dist/components/card/QCardActions.svelte.d.ts +1 -1
- package/dist/components/card/QCardSection.svelte +1 -1
- package/dist/components/card/QCardSection.svelte.d.ts +1 -1
- package/dist/components/card/docs.d.ts +1 -1
- package/dist/components/card/docs.props.js +1 -1
- package/dist/components/card/props.d.ts +6 -5
- package/dist/components/checkbox/QCheckbox.svelte +1 -1
- package/dist/components/checkbox/QCheckbox.svelte.d.ts +1 -1
- package/dist/components/checkbox/docs.d.ts +1 -1
- package/dist/components/checkbox/props.d.ts +3 -2
- package/dist/components/chip/QChip.svelte +26 -10
- package/dist/components/chip/QChip.svelte.d.ts +3 -2
- package/dist/components/chip/docs.d.ts +1 -1
- package/dist/components/chip/docs.props.js +8 -0
- package/dist/components/chip/index.scss +18 -1
- package/dist/components/chip/props.d.ts +8 -2
- package/dist/components/codeBlock/QCodeBlock.svelte +24 -22
- package/dist/components/codeBlock/QCodeBlock.svelte.d.ts +0 -1
- package/dist/components/codeBlock/props.d.ts +2 -1
- package/dist/components/dialog/QDialog.svelte +3 -3
- package/dist/components/dialog/QDialog.svelte.d.ts +1 -1
- package/dist/components/dialog/docs.d.ts +1 -1
- package/dist/components/dialog/docs.props.js +16 -0
- package/dist/components/dialog/props.d.ts +3 -2
- package/dist/components/drawer/QDrawer.svelte +3 -3
- package/dist/components/drawer/QDrawer.svelte.d.ts +2 -2
- package/dist/components/drawer/docs.d.ts +1 -1
- package/dist/components/drawer/docs.props.js +1 -1
- package/dist/components/drawer/props.d.ts +3 -2
- package/dist/components/footer/QFooter.svelte +3 -3
- package/dist/components/footer/QFooter.svelte.d.ts +2 -2
- package/dist/components/footer/docs.d.ts +1 -1
- package/dist/components/footer/docs.props.js +4 -4
- package/dist/components/footer/props.d.ts +3 -2
- package/dist/components/header/QHeader.svelte +2 -2
- package/dist/components/header/QHeader.svelte.d.ts +2 -2
- package/dist/components/header/docs.props.d.ts +24 -0
- package/dist/components/header/docs.props.js +70 -0
- package/dist/components/header/props.d.ts +2 -2
- package/dist/components/icon/QIcon.svelte +3 -5
- package/dist/components/icon/QIcon.svelte.d.ts +3 -2
- package/dist/components/icon/docs.d.ts +1 -1
- package/dist/components/icon/docs.props.js +4 -4
- package/dist/components/icon/props.d.ts +3 -2
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +2 -1
- package/dist/components/input/QInput.svelte +62 -73
- package/dist/components/input/QInput.svelte.d.ts +4 -3
- package/dist/components/input/docs.d.ts +1 -1
- package/dist/components/input/docs.js +1 -7
- package/dist/components/input/docs.props.js +5 -13
- package/dist/components/input/index.scss +1 -3
- package/dist/components/input/props.d.ts +3 -4
- package/dist/components/input/props.js +0 -1
- package/dist/components/layout/QLayout.svelte +7 -7
- package/dist/components/layout/QLayout.svelte.d.ts +5 -4
- package/dist/components/layout/docs.d.ts +1 -1
- package/dist/components/layout/docs.props.js +7 -7
- package/dist/components/layout/index.scss +10 -10
- package/dist/components/layout/props.d.ts +3 -2
- package/dist/components/list/QItem.svelte +26 -23
- package/dist/components/list/QItem.svelte.d.ts +4 -7
- package/dist/components/list/QItemSection.svelte +26 -22
- 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/docs.d.ts +1 -1
- package/dist/components/list/docs.props.js +43 -27
- package/dist/components/list/index.scss +28 -5
- package/dist/components/list/props.d.ts +9 -6
- package/dist/components/list/props.js +2 -2
- package/dist/components/private/QApi.svelte +2 -2
- package/dist/components/private/QApi.svelte.d.ts +1 -1
- package/dist/components/private/QDocs.svelte +2 -2
- package/dist/components/private/QDocs.svelte.d.ts +1 -1
- package/dist/components/private/QDocsSection.svelte +1 -2
- package/dist/components/progress/QCircularProgress.svelte +10 -5
- package/dist/components/progress/QCircularProgress.svelte.d.ts +2 -1
- package/dist/components/progress/QLinearProgress.svelte +1 -1
- package/dist/components/progress/QLinearProgress.svelte.d.ts +2 -2
- package/dist/components/progress/docs.d.ts +1 -1
- package/dist/components/progress/docs.props.js +15 -15
- package/dist/components/progress/props.d.ts +4 -3
- package/dist/components/radio/QRadio.svelte +1 -1
- package/dist/components/radio/QRadio.svelte.d.ts +1 -1
- package/dist/components/radio/docs.d.ts +1 -1
- package/dist/components/radio/docs.props.js +3 -3
- package/dist/components/radio/props.d.ts +3 -2
- package/dist/components/radio/props.js +1 -1
- package/dist/components/railbar/QRailbar.svelte +3 -3
- package/dist/components/railbar/QRailbar.svelte.d.ts +2 -2
- package/dist/components/railbar/docs.d.ts +1 -1
- package/dist/components/railbar/docs.props.js +7 -7
- package/dist/components/railbar/props.d.ts +3 -2
- package/dist/components/select/QSelect.svelte +90 -94
- package/dist/components/select/QSelect.svelte.d.ts +3 -2
- package/dist/components/select/docs.d.ts +1 -1
- package/dist/components/select/docs.js +1 -7
- package/dist/components/select/docs.props.js +4 -12
- package/dist/components/select/index.scss +17 -4
- package/dist/components/select/props.d.ts +7 -5
- package/dist/components/select/props.js +0 -1
- package/dist/components/separator/QSeparator.svelte +50 -55
- package/dist/components/separator/QSeparator.svelte.d.ts +2 -2
- package/dist/components/separator/docs.d.ts +1 -1
- package/dist/components/separator/docs.props.js +13 -13
- package/dist/components/separator/index.scss +52 -0
- package/dist/components/separator/props.d.ts +5 -4
- package/dist/components/table/QTable.svelte +3 -5
- package/dist/components/table/QTable.svelte.d.ts +3 -3
- package/dist/components/table/docs.d.ts +1 -1
- package/dist/components/table/docs.props.js +1 -1
- package/dist/components/table/props.d.ts +3 -2
- package/dist/components/tabs/QTab.svelte +50 -43
- package/dist/components/tabs/QTab.svelte.d.ts +2 -2
- package/dist/components/tabs/QTabs.svelte +61 -42
- package/dist/components/tabs/QTabs.svelte.d.ts +12 -2
- package/dist/components/tabs/docs.d.ts +1 -1
- package/dist/components/tabs/docs.props.js +2 -2
- package/dist/components/tabs/index.scss +33 -23
- package/dist/components/tabs/props.d.ts +5 -6
- package/dist/components/tabs/props.js +1 -13
- package/dist/components/toggle/QToggle.svelte +10 -3
- package/dist/components/toggle/QToggle.svelte.d.ts +1 -1
- package/dist/components/toggle/docs.d.ts +1 -1
- package/dist/components/toggle/props.d.ts +1 -1
- package/dist/components/toggle/props.js +1 -1
- package/dist/components/toolbar/QToolbar.svelte +2 -2
- package/dist/components/toolbar/QToolbar.svelte.d.ts +2 -2
- package/dist/components/toolbar/QToolbarTitle.svelte +1 -1
- package/dist/components/toolbar/QToolbarTitle.svelte.d.ts +2 -2
- package/dist/components/toolbar/docs.d.ts +1 -1
- package/dist/components/toolbar/docs.props.js +24 -8
- package/dist/components/toolbar/props.d.ts +4 -3
- package/dist/components/tooltip/QTooltip.svelte +1 -1
- package/dist/components/tooltip/QTooltip.svelte.d.ts +1 -1
- package/dist/components/tooltip/docs.d.ts +1 -1
- package/dist/components/tooltip/docs.props.js +1 -1
- package/dist/components/tooltip/props.d.ts +3 -2
- package/dist/components/tooltip/props.js +1 -1
- package/dist/composables/index.d.ts +3 -0
- package/dist/composables/index.js +3 -1
- package/dist/composables/use-align.d.ts +1 -1
- package/dist/composables/use-align.js +1 -1
- package/dist/composables/use-router-link.d.ts +3 -3
- package/dist/composables/use-router-link.js +4 -4
- package/dist/composables/use-size.d.ts +1 -1
- package/dist/composables/use-size.js +2 -2
- package/dist/css/index.css +1 -1
- package/dist/css/index.scss +1 -0
- package/dist/css/mixins/field-mixins.scss +52 -0
- package/dist/css/mixins.scss +3 -4
- package/dist/css/ripple.scss +1 -1
- package/dist/css/shared/q-field.scss +305 -0
- package/dist/css/theme/colors.module.scss +261 -109
- package/dist/css/theme/palette.scss +8 -2
- package/dist/css/theme/theme.dark.scss +3 -1
- package/dist/css/theme/theme.light.scss +3 -1
- package/dist/helpers/index.d.ts +1 -1
- package/dist/helpers/index.js +1 -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 +8 -7
- package/dist/stores/QTheme.js +3 -3
- package/dist/stores/Quaff.js +19 -14
- package/dist/stores/index.d.ts +2 -0
- package/dist/stores/index.js +2 -0
- package/dist/utils/clipboard.d.ts +1 -1
- package/dist/utils/clipboard.js +1 -2
- package/dist/utils/dom.d.ts +1 -0
- package/dist/utils/dom.js +4 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +8 -1
- package/dist/utils/props.d.ts +2 -2
- package/dist/utils/types.d.ts +3 -3
- package/dist/utils/types.json +1 -1
- package/package.json +22 -23
- package/dist/composables/use-index.d.ts +0 -2
- package/dist/composables/use-index.js +0 -17
- package/dist/css/mixins/field.scss +0 -432
- package/dist/helpers/activationHandler.d.ts +0 -9
- package/dist/helpers/activationHandler.js +0 -23
- package/dist/utils/fields.d.ts +0 -1
- package/dist/utils/fields.js +0 -14
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
export const QInputDocsProps = [
|
|
2
|
-
{
|
|
3
|
-
name: "bordered",
|
|
4
|
-
type: "boolean",
|
|
5
|
-
optional: false,
|
|
6
|
-
clickableType: false,
|
|
7
|
-
description: "",
|
|
8
|
-
default: "",
|
|
9
|
-
},
|
|
10
2
|
{
|
|
11
3
|
name: "dense",
|
|
12
4
|
type: "boolean",
|
|
@@ -18,7 +10,7 @@ export const QInputDocsProps = [
|
|
|
18
10
|
{
|
|
19
11
|
name: "disable",
|
|
20
12
|
type: "boolean",
|
|
21
|
-
optional:
|
|
13
|
+
optional: true,
|
|
22
14
|
clickableType: false,
|
|
23
15
|
description: "",
|
|
24
16
|
default: "",
|
|
@@ -26,7 +18,7 @@ export const QInputDocsProps = [
|
|
|
26
18
|
{
|
|
27
19
|
name: "error",
|
|
28
20
|
type: "boolean",
|
|
29
|
-
optional:
|
|
21
|
+
optional: true,
|
|
30
22
|
clickableType: false,
|
|
31
23
|
description: "",
|
|
32
24
|
default: "",
|
|
@@ -42,7 +34,7 @@ export const QInputDocsProps = [
|
|
|
42
34
|
{
|
|
43
35
|
name: "filled",
|
|
44
36
|
type: "boolean",
|
|
45
|
-
optional:
|
|
37
|
+
optional: true,
|
|
46
38
|
clickableType: false,
|
|
47
39
|
description: "",
|
|
48
40
|
default: "",
|
|
@@ -66,7 +58,7 @@ export const QInputDocsProps = [
|
|
|
66
58
|
{
|
|
67
59
|
name: "outlined",
|
|
68
60
|
type: "boolean",
|
|
69
|
-
optional:
|
|
61
|
+
optional: true,
|
|
70
62
|
clickableType: false,
|
|
71
63
|
description: "",
|
|
72
64
|
default: "",
|
|
@@ -74,7 +66,7 @@ export const QInputDocsProps = [
|
|
|
74
66
|
{
|
|
75
67
|
name: "rounded",
|
|
76
68
|
type: "boolean",
|
|
77
|
-
optional:
|
|
69
|
+
optional: true,
|
|
78
70
|
clickableType: false,
|
|
79
71
|
description: "",
|
|
80
72
|
default: "",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { NativeProps } from "../../utils
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { NativeProps } from "../../utils";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
export interface QInputProps extends NativeProps, HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
dense?: boolean;
|
|
5
5
|
disable?: boolean;
|
|
6
6
|
error?: boolean;
|
|
@@ -13,7 +13,6 @@ export interface QInputProps extends NativeProps {
|
|
|
13
13
|
value: string;
|
|
14
14
|
}
|
|
15
15
|
export declare const QInputPropsDefaults: {
|
|
16
|
-
bordered: boolean;
|
|
17
16
|
dense: boolean;
|
|
18
17
|
disable: boolean;
|
|
19
18
|
error: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<script context="module"
|
|
2
|
-
|
|
3
|
-
<script>import { setContext } from "svelte";
|
|
4
|
-
import { createClasses, createStyles } from "../../utils/props";
|
|
5
|
-
import ContextReseter from "../private/ContextReseter.svelte";
|
|
1
|
+
<script context="module">import { createStyles, createClasses } from "../../utils";
|
|
2
|
+
import { setContext } from "svelte";
|
|
6
3
|
import { writable } from "svelte/store";
|
|
7
|
-
|
|
4
|
+
import ContextReseter from "../private/ContextReseter.svelte";
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<script>export let view = "hhh lpr fff", headerHeight = "64px", footerHeight = "80px", leftDrawerWidth = "300px", rightDrawerWidth = "300px", leftRailbarWidth = "88px", rightRailbarWidth = "88px", userClasses = void 0, userStyles = void 0;
|
|
8
8
|
export { userClasses as class, userStyles as style };
|
|
9
9
|
$:
|
|
10
10
|
style = createStyles(
|
|
@@ -63,7 +63,7 @@ $:
|
|
|
63
63
|
setContext("layout", ctx);
|
|
64
64
|
</script>
|
|
65
65
|
|
|
66
|
-
<div class={classes} {style} on:scroll on:resize>
|
|
66
|
+
<div class={classes} {style} {...$$restProps} on:scroll on:resize>
|
|
67
67
|
{#if $$slots.railbarLeft}
|
|
68
68
|
<slot name="railbarLeft" />
|
|
69
69
|
{/if}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { QLayoutProps } from "./props";
|
|
3
|
+
import type { Readable } from "svelte/store";
|
|
2
4
|
export interface DrawerContext {
|
|
3
5
|
offset: {
|
|
4
6
|
top: boolean;
|
|
@@ -19,10 +21,9 @@ export type LayoutContext = Readable<{
|
|
|
19
21
|
drawerLeft: DrawerContext;
|
|
20
22
|
drawerRight: DrawerContext;
|
|
21
23
|
}>;
|
|
22
|
-
import type { QLayoutProps } from "./props";
|
|
23
|
-
import type { Readable } from "svelte/store";
|
|
24
24
|
declare const __propDef: {
|
|
25
25
|
props: {
|
|
26
|
+
[x: string]: any;
|
|
26
27
|
view?: QLayoutProps["view"];
|
|
27
28
|
headerHeight?: QLayoutProps["headerHeight"];
|
|
28
29
|
footerHeight?: QLayoutProps["footerHeight"];
|
|
@@ -30,8 +31,8 @@ declare const __propDef: {
|
|
|
30
31
|
rightDrawerWidth?: QLayoutProps["rightDrawerWidth"];
|
|
31
32
|
leftRailbarWidth?: QLayoutProps["leftRailbarWidth"];
|
|
32
33
|
rightRailbarWidth?: QLayoutProps["rightDrawerWidth"];
|
|
33
|
-
class?: string | undefined;
|
|
34
|
-
style?: string | undefined;
|
|
34
|
+
class?: string | null | undefined;
|
|
35
|
+
style?: string | null | undefined;
|
|
35
36
|
};
|
|
36
37
|
events: {
|
|
37
38
|
scroll: Event;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "../../utils
|
|
1
|
+
import type { QComponentDocs } from "../../utils";
|
|
2
2
|
export declare let QLayoutDocs: QComponentDocs;
|
|
@@ -2,7 +2,7 @@ export const QLayoutDocsProps = [
|
|
|
2
2
|
{
|
|
3
3
|
name: "view",
|
|
4
4
|
type: "QLayoutViewOptions",
|
|
5
|
-
optional:
|
|
5
|
+
optional: true,
|
|
6
6
|
clickableType: true,
|
|
7
7
|
description: 'The layout view configuration, which defines how layout components (header, railbars, drawers, footer) should be displayed on screen.\nSee <a href="https://quasar.dev/layout/layout/#understanding-the-view-prop" target="_blank">Quasar\'s explanation on the view prop</a>.',
|
|
8
8
|
default: '"hhh lpr fff"',
|
|
@@ -10,7 +10,7 @@ export const QLayoutDocsProps = [
|
|
|
10
10
|
{
|
|
11
11
|
name: "headerHeight",
|
|
12
12
|
type: "string | number",
|
|
13
|
-
optional:
|
|
13
|
+
optional: true,
|
|
14
14
|
clickableType: false,
|
|
15
15
|
description: 'The height of the header. Can be specified with CSS units. If no unit is specified, "px" will be used.',
|
|
16
16
|
default: "64px",
|
|
@@ -18,7 +18,7 @@ export const QLayoutDocsProps = [
|
|
|
18
18
|
{
|
|
19
19
|
name: "footerHeight",
|
|
20
20
|
type: "string | number",
|
|
21
|
-
optional:
|
|
21
|
+
optional: true,
|
|
22
22
|
clickableType: false,
|
|
23
23
|
description: 'The height of the footer. Can be specified with CSS units. If no unit is specified, "px" will be used.',
|
|
24
24
|
default: "80px",
|
|
@@ -26,7 +26,7 @@ export const QLayoutDocsProps = [
|
|
|
26
26
|
{
|
|
27
27
|
name: "leftDrawerWidth",
|
|
28
28
|
type: "string | number",
|
|
29
|
-
optional:
|
|
29
|
+
optional: true,
|
|
30
30
|
clickableType: false,
|
|
31
31
|
description: 'The width of the left drawer. Can be specified with CSS units. If no unit is specified, "px" will be used.',
|
|
32
32
|
default: "300px",
|
|
@@ -34,7 +34,7 @@ export const QLayoutDocsProps = [
|
|
|
34
34
|
{
|
|
35
35
|
name: "rightDrawerWidth",
|
|
36
36
|
type: "string | number",
|
|
37
|
-
optional:
|
|
37
|
+
optional: true,
|
|
38
38
|
clickableType: false,
|
|
39
39
|
description: 'The width of the right drawer. Can be specified with CSS units. If no unit is specified, "px" will be used.',
|
|
40
40
|
default: "300px",
|
|
@@ -42,7 +42,7 @@ export const QLayoutDocsProps = [
|
|
|
42
42
|
{
|
|
43
43
|
name: "leftRailbarWidth",
|
|
44
44
|
type: "string | number",
|
|
45
|
-
optional:
|
|
45
|
+
optional: true,
|
|
46
46
|
clickableType: false,
|
|
47
47
|
description: 'The width of the left railbar. Can be specified with CSS units. If no unit is specified, "px" will be used.',
|
|
48
48
|
default: "88px",
|
|
@@ -50,7 +50,7 @@ export const QLayoutDocsProps = [
|
|
|
50
50
|
{
|
|
51
51
|
name: "rightRailbarWidth",
|
|
52
52
|
type: "string | number",
|
|
53
|
-
optional:
|
|
53
|
+
optional: true,
|
|
54
54
|
clickableType: false,
|
|
55
55
|
description: 'The width of the right railbar. Can be specified with CSS units. If no unit is specified, "px" will be used.',
|
|
56
56
|
default: "88px",
|
|
@@ -117,6 +117,10 @@ $contentSlot: ":not(.q-header, .q-footer, .q-railbar, .q-drawer)";
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
& > .q-list {
|
|
121
|
+
gap: 0.5rem;
|
|
122
|
+
}
|
|
123
|
+
|
|
120
124
|
& > .q-list > .q-item {
|
|
121
125
|
flex-direction: column;
|
|
122
126
|
border-radius: 2rem;
|
|
@@ -125,7 +129,7 @@ $contentSlot: ":not(.q-header, .q-footer, .q-railbar, .q-drawer)";
|
|
|
125
129
|
padding: 0 8px;
|
|
126
130
|
gap: 0.25em;
|
|
127
131
|
|
|
128
|
-
&.
|
|
132
|
+
&.q-link::after {
|
|
129
133
|
all: unset;
|
|
130
134
|
}
|
|
131
135
|
|
|
@@ -135,13 +139,13 @@ $contentSlot: ":not(.q-header, .q-footer, .q-railbar, .q-drawer)";
|
|
|
135
139
|
|
|
136
140
|
& > i {
|
|
137
141
|
transition: var(--speed1) padding linear;
|
|
138
|
-
padding
|
|
142
|
+
padding: 0.25rem;
|
|
139
143
|
}
|
|
140
144
|
|
|
141
|
-
&:is(:hover, :focus,
|
|
145
|
+
&:is(:hover, :focus, &--active) > i {
|
|
142
146
|
background-color: var(--secondary-container);
|
|
143
147
|
color: var(--on-secondary-container);
|
|
144
|
-
padding:
|
|
148
|
+
padding-inline: 1.5rem;
|
|
145
149
|
font-variation-settings:
|
|
146
150
|
"FILL" 1,
|
|
147
151
|
"wght" 400,
|
|
@@ -171,6 +175,7 @@ $contentSlot: ":not(.q-header, .q-footer, .q-railbar, .q-drawer)";
|
|
|
171
175
|
|
|
172
176
|
& .q-list > .q-item.q-link {
|
|
173
177
|
border-radius: 2rem;
|
|
178
|
+
overflow: hidden;
|
|
174
179
|
|
|
175
180
|
&::before {
|
|
176
181
|
content: "";
|
|
@@ -189,7 +194,7 @@ $contentSlot: ":not(.q-header, .q-footer, .q-railbar, .q-drawer)";
|
|
|
189
194
|
transition-timing-function: linear;
|
|
190
195
|
}
|
|
191
196
|
|
|
192
|
-
&.active {
|
|
197
|
+
&.q-item--active {
|
|
193
198
|
color: var(--on-secondary-container);
|
|
194
199
|
|
|
195
200
|
&::before {
|
|
@@ -197,11 +202,6 @@ $contentSlot: ":not(.q-header, .q-footer, .q-railbar, .q-drawer)";
|
|
|
197
202
|
transform: scaleX(1);
|
|
198
203
|
}
|
|
199
204
|
}
|
|
200
|
-
|
|
201
|
-
&:hover {
|
|
202
|
-
background-color: var(--on-surface-variant-2);
|
|
203
|
-
font-variation-settings: "GRAD" 50;
|
|
204
|
-
}
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { NativeProps } from "../../utils
|
|
1
|
+
import type { NativeProps } from "../../utils";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
3
|
export type QLayoutViewOptions = `${"l" | "h"}${"h" | "H"}${"r" | "h"} ${"l" | "L"}${"p"}${"r" | "R"} ${"l" | "f"}${"f" | "F"}${"r" | "f"}`;
|
|
3
|
-
export interface QLayoutProps extends NativeProps {
|
|
4
|
+
export interface QLayoutProps extends NativeProps, HTMLAttributes<HTMLDivElement> {
|
|
4
5
|
/**
|
|
5
6
|
* The layout view configuration, which defines how layout components (header, railbars, drawers, footer) should be displayed on screen.
|
|
6
7
|
* See <a href="https://quasar.dev/layout/layout/#understanding-the-view-prop" target="_blank">Quasar's explanation on the view prop</a>.
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import
|
|
3
|
-
import { createClasses } from "../../utils/props";
|
|
4
|
-
import { getContext, setContext } from "svelte";
|
|
1
|
+
<script>import { useRouterLink, isRouteActive } from "../../composables";
|
|
2
|
+
import { ripple } from "../../helpers";
|
|
5
3
|
import { Quaff } from "../../stores/Quaff";
|
|
4
|
+
import { createClasses } from "../../utils";
|
|
5
|
+
import { setContext, getContext } from "svelte";
|
|
6
6
|
import { writable } from "svelte/store";
|
|
7
|
-
|
|
7
|
+
import { QSeparator } from "../..";
|
|
8
|
+
export let tag = "div", active = false, clickable = false, dense = false, tabindex = 0, href = void 0, to = void 0, disable = false, activeClass = void 0, replace = false, noRipple = false, userClasses = void 0;
|
|
8
9
|
export { userClasses as class };
|
|
9
|
-
let
|
|
10
|
-
setContext("hasMultipleLines",
|
|
10
|
+
let hasMultipleLines = writable(false);
|
|
11
|
+
setContext("hasMultipleLines", hasMultipleLines);
|
|
11
12
|
$:
|
|
12
13
|
({ hasLink, linkAttributes, linkClasses } = useRouterLink({
|
|
13
14
|
href,
|
|
@@ -19,23 +20,25 @@ $:
|
|
|
19
20
|
$:
|
|
20
21
|
separatorOptions = getContext("separator");
|
|
21
22
|
$:
|
|
22
|
-
isActionable = clickable
|
|
23
|
+
isActionable = clickable || hasLink || tag === "label";
|
|
23
24
|
$:
|
|
24
|
-
isClickable =
|
|
25
|
+
isClickable = isActionable && !disable;
|
|
25
26
|
$:
|
|
26
27
|
isActive = isRouteActive($Quaff.router, to);
|
|
27
28
|
$:
|
|
28
|
-
classes = createClasses(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
classes = createClasses(
|
|
30
|
+
[
|
|
31
|
+
$hasMultipleLines && "multiline",
|
|
32
|
+
dense && "dense",
|
|
33
|
+
(isActive || hasLink && active) && activeClass,
|
|
34
|
+
(isActive || hasLink && active) && "active"
|
|
35
|
+
],
|
|
36
|
+
{
|
|
37
|
+
component: "q-item",
|
|
38
|
+
quaffClasses: [linkClasses],
|
|
39
|
+
userClasses
|
|
40
|
+
}
|
|
41
|
+
);
|
|
39
42
|
$:
|
|
40
43
|
attributes = {
|
|
41
44
|
class: classes,
|
|
@@ -50,11 +53,11 @@ $:
|
|
|
50
53
|
{/if}
|
|
51
54
|
{#if linkAttributes.href !== undefined}
|
|
52
55
|
<!-- svelte-ignore a11y-missing-attribute -->
|
|
53
|
-
<a {...attributes} {...linkAttributes}
|
|
56
|
+
<a use:ripple={{ disable: !isClickable || noRipple }} {...attributes} {...linkAttributes}>
|
|
54
57
|
<slot />
|
|
55
58
|
</a>
|
|
56
59
|
{:else}
|
|
57
|
-
<
|
|
60
|
+
<svelte:element this={tag} {...attributes}>
|
|
58
61
|
<slot />
|
|
59
|
-
</
|
|
62
|
+
</svelte:element>
|
|
60
63
|
{/if}
|
|
@@ -10,16 +10,13 @@ declare const __propDef: {
|
|
|
10
10
|
tabindex?: QItemProps["tabindex"];
|
|
11
11
|
href?: QItemProps["href"];
|
|
12
12
|
to?: QItemProps["to"];
|
|
13
|
-
disable?:
|
|
13
|
+
disable?: QItemProps["disable"];
|
|
14
14
|
activeClass?: QItemProps["activeClass"];
|
|
15
|
-
replace?:
|
|
16
|
-
|
|
15
|
+
replace?: QItemProps["replace"];
|
|
16
|
+
noRipple?: QItemProps["noRipple"];
|
|
17
|
+
class?: string | null | undefined;
|
|
17
18
|
};
|
|
18
19
|
events: {
|
|
19
|
-
mouseenter: MouseEvent;
|
|
20
|
-
mouseleave: MouseEvent;
|
|
21
|
-
click: MouseEvent;
|
|
22
|
-
} & {
|
|
23
20
|
[evt: string]: CustomEvent<any>;
|
|
24
21
|
};
|
|
25
22
|
slots: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script>import { createClasses } from "../../utils
|
|
1
|
+
<script>import { createClasses } from "../../utils";
|
|
2
2
|
import { getContext } from "svelte";
|
|
3
3
|
export let type = "content", userClasses = void 0;
|
|
4
4
|
export { userClasses as class };
|
|
@@ -9,36 +9,40 @@ $:
|
|
|
9
9
|
$ctx = $$slots.headline && [$$slots.line1, $$slots.line2, $$slots.line3].filter(Boolean).length >= 2;
|
|
10
10
|
}
|
|
11
11
|
$:
|
|
12
|
-
classes = createClasses([
|
|
12
|
+
classes = createClasses([type], {
|
|
13
|
+
component: "q-item__section",
|
|
14
|
+
userClasses
|
|
15
|
+
});
|
|
13
16
|
</script>
|
|
14
17
|
|
|
15
18
|
<div class={classes} {...$$restProps}>
|
|
16
19
|
{#if type === "content"}
|
|
17
|
-
{#if [$$slots.headline, $$slots.line2, $$slots.line2, $$slots.line3].some(Boolean)
|
|
20
|
+
{#if ![$$slots.headline, $$slots.line2, $$slots.line2, $$slots.line3].some(Boolean)}
|
|
18
21
|
<slot />
|
|
19
|
-
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{/if}
|
|
25
|
-
<div class="body-medium on-surface-variant-text">
|
|
26
|
-
{#if $$slots.line1}
|
|
27
|
-
<slot name="line1" />
|
|
22
|
+
{:else}
|
|
23
|
+
{#if $$slots.headline}
|
|
24
|
+
<div class="body-large text-on-surface">
|
|
25
|
+
<slot name="headline" />
|
|
26
|
+
</div>
|
|
28
27
|
{/if}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</div>
|
|
34
|
-
{/if}
|
|
35
|
-
{#if $$slots.line3}
|
|
36
|
-
<div class="body-medium on-surface-variant-text">
|
|
37
|
-
<slot name="line3" />
|
|
28
|
+
<div class="body-medium text-on-surface-variant">
|
|
29
|
+
{#if $$slots.line1}
|
|
30
|
+
<slot name="line1" />
|
|
31
|
+
{/if}
|
|
38
32
|
</div>
|
|
33
|
+
{#if $$slots.line2}
|
|
34
|
+
<div class="body-medium text-on-surface-variant">
|
|
35
|
+
<slot name="line2" />
|
|
36
|
+
</div>
|
|
37
|
+
{/if}
|
|
38
|
+
{#if $$slots.line3}
|
|
39
|
+
<div class="body-medium text-on-surface-variant">
|
|
40
|
+
<slot name="line3" />
|
|
41
|
+
</div>
|
|
42
|
+
{/if}
|
|
39
43
|
{/if}
|
|
40
44
|
{:else if type === "trailingText"}
|
|
41
|
-
<div class="label-small on-surface-variant
|
|
45
|
+
<div class="label-small text-on-surface-variant">
|
|
42
46
|
<slot />
|
|
43
47
|
</div>
|
|
44
48
|
{:else}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import { createClasses } from "../../utils/props";
|
|
1
|
+
<script>import { createClasses } from "../../utils";
|
|
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>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "../../utils
|
|
1
|
+
import type { QComponentDocs } from "../../utils";
|
|
2
2
|
export declare let QListDocs: QComponentDocs;
|