@quaffui/quaff 0.1.0-prealpha → 0.1.0-prealpha10
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/QAvatar.svelte.d.ts +4 -4
- package/dist/components/avatar/docs.d.ts +1 -1
- package/dist/components/avatar/index.scss +4 -1
- package/dist/components/avatar/props.d.ts +2 -2
- package/dist/components/avatar/props.js +1 -1
- package/dist/components/breadcrumbs/QBreadcrumbs.svelte.d.ts +4 -4
- package/dist/components/breadcrumbs/QBreadcrumbsEl.svelte.d.ts +4 -4
- package/dist/components/breadcrumbs/docs.d.ts +1 -1
- package/dist/components/button/QBtn.svelte +23 -9
- package/dist/components/button/QBtn.svelte.d.ts +6 -5
- package/dist/components/button/docs.d.ts +1 -1
- package/dist/components/button/docs.props.js +8 -0
- package/dist/components/button/index.scss +23 -3
- package/dist/components/button/props.d.ts +7 -2
- package/dist/components/card/QCard.svelte +1 -1
- package/dist/components/card/QCard.svelte.d.ts +4 -4
- package/dist/components/card/QCardActions.svelte +1 -1
- package/dist/components/card/QCardActions.svelte.d.ts +4 -4
- package/dist/components/card/QCardSection.svelte +1 -1
- package/dist/components/card/QCardSection.svelte.d.ts +4 -4
- package/dist/components/card/docs.props.js +1 -1
- package/dist/components/card/index.scss +4 -1
- package/dist/components/checkbox/QCheckbox.svelte.d.ts +4 -4
- package/dist/components/checkbox/index.scss +4 -0
- package/dist/components/chip/QChip.svelte +8 -2
- package/dist/components/chip/QChip.svelte.d.ts +4 -4
- package/dist/components/chip/docs.d.ts +1 -1
- package/dist/components/chip/docs.props.js +3 -3
- package/dist/components/chip/index.scss +4 -1
- package/dist/components/chip/props.d.ts +2 -2
- package/dist/components/codeBlock/QCodeBlock.svelte +8 -9
- package/dist/components/codeBlock/QCodeBlock.svelte.d.ts +5 -7
- package/dist/components/dialog/QDialog.svelte +34 -20
- package/dist/components/dialog/QDialog.svelte.d.ts +4 -5
- package/dist/components/dialog/docs.d.ts +1 -1
- package/dist/components/dialog/docs.props.js +10 -2
- package/dist/components/dialog/index.scss +150 -3
- package/dist/components/drawer/QDrawer.svelte +50 -38
- package/dist/components/drawer/QDrawer.svelte.d.ts +5 -4
- package/dist/components/drawer/docs.d.ts +1 -1
- package/dist/components/drawer/index.scss +14 -9
- package/dist/components/drawer/props.d.ts +2 -2
- package/dist/components/footer/QFooter.svelte +18 -4
- package/dist/components/footer/QFooter.svelte.d.ts +6 -6
- package/dist/components/footer/docs.d.ts +1 -1
- package/dist/components/footer/index.scss +23 -0
- package/dist/components/footer/props.d.ts +4 -4
- package/dist/components/header/QHeader.svelte +28 -0
- package/dist/components/header/QHeader.svelte.d.ts +24 -0
- package/dist/components/header/props.d.ts +15 -0
- package/dist/components/header/props.js +1 -0
- package/dist/components/icon/QIcon.svelte +11 -13
- package/dist/components/icon/QIcon.svelte.d.ts +5 -5
- package/dist/components/icon/docs.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 +3 -1
- package/dist/components/index.js +3 -1
- package/dist/components/input/QInput.svelte.d.ts +4 -4
- package/dist/components/input/docs.d.ts +1 -1
- package/dist/components/input/props.d.ts +1 -1
- package/dist/components/layout/QLayout.svelte.d.ts +4 -4
- package/dist/components/layout/docs.d.ts +1 -1
- package/dist/components/layout/index.scss +93 -76
- package/dist/components/list/QItem.svelte +1 -1
- package/dist/components/list/QItem.svelte.d.ts +4 -4
- package/dist/components/list/QItemSection.svelte.d.ts +4 -4
- package/dist/components/list/QList.svelte.d.ts +4 -4
- 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 +7 -0
- package/dist/components/private/ContextReseter.svelte.d.ts +2 -2
- package/dist/components/private/QApi.svelte +25 -22
- package/dist/components/private/QApi.svelte.d.ts +2 -2
- package/dist/components/private/QDocs.svelte +38 -10
- package/dist/components/private/QDocs.svelte.d.ts +3 -3
- package/dist/components/private/QDocsSection.svelte +2 -2
- package/dist/components/private/QDocsSection.svelte.d.ts +2 -2
- package/dist/components/progress/QCircularProgress.svelte +4 -3
- package/dist/components/progress/QCircularProgress.svelte.d.ts +5 -5
- package/dist/components/progress/QLinearProgress.svelte +8 -2
- package/dist/components/progress/QLinearProgress.svelte.d.ts +4 -4
- 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/radio/QRadio.svelte.d.ts +4 -4
- package/dist/components/radio/docs.d.ts +1 -1
- package/dist/components/railbar/QRailbar.svelte +48 -29
- package/dist/components/railbar/QRailbar.svelte.d.ts +5 -5
- package/dist/components/railbar/docs.d.ts +2 -0
- package/dist/components/railbar/docs.js +11 -0
- package/dist/components/railbar/index.scss +39 -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/QSelect.svelte.d.ts +4 -4
- package/dist/components/select/docs.d.ts +1 -1
- package/dist/components/select/docs.props.js +2 -2
- package/dist/components/select/index.scss +8 -2
- package/dist/components/select/props.d.ts +1 -1
- package/dist/components/separator/QSeparator.svelte +1 -1
- package/dist/components/separator/QSeparator.svelte.d.ts +4 -4
- package/dist/components/separator/docs.d.ts +2 -0
- package/dist/components/separator/docs.js +11 -0
- package/dist/components/separator/props.d.ts +1 -1
- package/dist/components/table/QTable.svelte.d.ts +4 -4
- package/dist/components/table/docs.d.ts +1 -1
- package/dist/components/tabs/QTab.svelte +45 -17
- package/dist/components/tabs/QTab.svelte.d.ts +5 -7
- package/dist/components/tabs/QTabs.svelte +3 -7
- package/dist/components/tabs/QTabs.svelte.d.ts +4 -4
- 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/tabs/index.scss +40 -9
- package/dist/components/toggle/QToggle.svelte.d.ts +4 -4
- 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 +6 -22
- package/dist/components/toolbar/QToolbar.svelte.d.ts +7 -5
- 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 +35 -0
- package/dist/components/toolbar/props.d.ts +22 -3
- package/dist/components/toolbar/props.js +1 -6
- package/dist/components/tooltip/QTooltip.svelte +3 -5
- package/dist/components/tooltip/QTooltip.svelte.d.ts +4 -4
- 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-router-link.js +0 -1
- 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 -0
- package/dist/css/index.scss +5 -23
- package/dist/css/mixins/field.scss +3 -1
- package/dist/css/mixins/menu.scss +3 -1
- package/dist/css/mixins.scss +5 -4
- package/dist/css/ripple.scss +42 -0
- package/dist/css/states.scss +9 -4
- 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/global.d.ts +0 -1
- package/dist/helpers/ripple.d.ts +10 -0
- package/dist/helpers/ripple.js +79 -0
- package/dist/helpers/version.d.ts +2 -0
- package/dist/helpers/version.js +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/stores/QTheme.d.ts +2 -1
- package/dist/stores/Quaff.d.ts +6 -5
- package/dist/stores/Quaff.js +2 -1
- package/dist/utils/dom.d.ts +8 -0
- package/dist/utils/dom.js +71 -0
- package/dist/utils/events.d.ts +13 -0
- package/dist/utils/events.js +13 -0
- package/dist/utils/props.d.ts +1 -1
- package/dist/utils/props.js +1 -1
- package/dist/utils/types.d.ts +3 -0
- package/dist/utils/types.json +1 -1
- package/dist/utils/watchable.d.ts +1 -0
- package/package.json +34 -28
|
@@ -6,11 +6,14 @@
|
|
|
6
6
|
max-width: 100%;
|
|
7
7
|
overflow: auto;
|
|
8
8
|
scroll-behavior: smooth;
|
|
9
|
+
border-radius: 0;
|
|
10
|
+
border-bottom: solid 0.0625rem var(--outline);
|
|
9
11
|
&::-webkit-scrollbar {
|
|
10
12
|
display: none;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
& > .q-tab {
|
|
16
|
+
position: relative;
|
|
14
17
|
box-sizing: border-box;
|
|
15
18
|
height: 48px;
|
|
16
19
|
min-width: max-content;
|
|
@@ -18,24 +21,52 @@
|
|
|
18
21
|
align-items: center;
|
|
19
22
|
justify-content: center;
|
|
20
23
|
flex: 1;
|
|
21
|
-
background-color:
|
|
24
|
+
background-color: var(--surface);
|
|
25
|
+
color: var(--on-surface);
|
|
22
26
|
border-radius: 0;
|
|
23
27
|
gap: 0;
|
|
28
|
+
overflow: hidden;
|
|
24
29
|
|
|
25
|
-
&
|
|
26
|
-
margin-right:
|
|
30
|
+
& .q-tab__icon {
|
|
31
|
+
margin-right: 0.25rem;
|
|
27
32
|
}
|
|
28
33
|
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
&--active {
|
|
35
|
+
color: var(--primary);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&:is(:hover, :focus):not([aria-disabled])::after {
|
|
39
|
+
content: "";
|
|
40
|
+
position: absolute;
|
|
41
|
+
top: 0;
|
|
42
|
+
left: 0;
|
|
43
|
+
width: 100%;
|
|
44
|
+
height: 100%;
|
|
45
|
+
background-color: var(--on-surface);
|
|
46
|
+
border-radius: none;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:hover:not([aria-disabled])::after {
|
|
51
|
+
opacity: 0.08;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&:focus:not([aria-disabled])::after {
|
|
55
|
+
opacity: 0.16;
|
|
31
56
|
}
|
|
32
57
|
}
|
|
33
58
|
|
|
34
|
-
&.
|
|
59
|
+
&.q-tabs--vertical {
|
|
35
60
|
flex-direction: column;
|
|
36
|
-
min-height: calc(var(--tab-count) *
|
|
61
|
+
min-height: calc(var(--tab-count) * 3rem);
|
|
37
62
|
width: fit-content;
|
|
38
63
|
align-items: stretch;
|
|
64
|
+
border-bottom: unset;
|
|
65
|
+
border-right: solid 0.0625rem var(--outline);
|
|
66
|
+
|
|
67
|
+
& > .q-tab {
|
|
68
|
+
@include padding("x", "md");
|
|
69
|
+
}
|
|
39
70
|
|
|
40
71
|
&::after {
|
|
41
72
|
top: var(--indicator-position);
|
|
@@ -62,11 +93,11 @@
|
|
|
62
93
|
opacity: 0;
|
|
63
94
|
}
|
|
64
95
|
|
|
65
|
-
&:not(.hidden-indicator)::after {
|
|
96
|
+
&:not(.q-tabs--hidden-indicator)::after {
|
|
66
97
|
opacity: 1;
|
|
67
98
|
}
|
|
68
99
|
|
|
69
|
-
&.
|
|
100
|
+
&.q-tabs--primary::after {
|
|
70
101
|
left: var(--indicator-position);
|
|
71
102
|
transform: translateX(-50%);
|
|
72
103
|
height: 3px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { QToggleProps } from "./props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
@@ -15,9 +15,9 @@ declare const __propDef: {
|
|
|
15
15
|
};
|
|
16
16
|
slots: {};
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
type QToggleProps_ = typeof __propDef.props;
|
|
19
|
+
export { QToggleProps_ as QToggleProps };
|
|
19
20
|
export type QToggleEvents = typeof __propDef.events;
|
|
20
21
|
export type QToggleSlots = typeof __propDef.slots;
|
|
21
|
-
export default class QToggle extends
|
|
22
|
+
export default class QToggle extends SvelteComponent<QToggleProps, QToggleEvents, QToggleSlots> {
|
|
22
23
|
}
|
|
23
|
-
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "
|
|
1
|
+
import type { QComponentDocs } from "../../utils/types";
|
|
2
2
|
export declare let QToggleDocs: QComponentDocs;
|
|
@@ -1,32 +1,16 @@
|
|
|
1
1
|
<script>import { createClasses, createStyles } from "../../utils/props";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export let inset = false, height = "64px", userClasses = void 0, userStyles = void 0;
|
|
2
|
+
import { useSize } from "../../composables/use-size";
|
|
3
|
+
export let inset = false, border = false, elevate = false, height = "64px", userClasses = void 0, userStyles = void 0;
|
|
5
4
|
export { userClasses as class, userStyles as style };
|
|
6
|
-
let ctx = getContext("layout");
|
|
7
5
|
$:
|
|
8
|
-
classes = createClasses([
|
|
9
|
-
|
|
10
|
-
"q-toolbar",
|
|
11
|
-
"surface",
|
|
12
|
-
$ctx?.header?.fixed && "fixed",
|
|
13
|
-
inset && "q-toolbar--inset",
|
|
6
|
+
classes = createClasses([inset && "inset", elevate && "elevated", border && "bordered"], {
|
|
7
|
+
component: "q-toolbar",
|
|
14
8
|
userClasses
|
|
15
|
-
|
|
16
|
-
$:
|
|
17
|
-
heightStyle = ctx === void 0 ? isNumber(height) ? `${height}px` : height : void 0;
|
|
18
|
-
$:
|
|
19
|
-
if ($ctx?.header !== void 0) {
|
|
20
|
-
if (userStyles?.includes("display: none")) {
|
|
21
|
-
$ctx.header.display = false;
|
|
22
|
-
} else {
|
|
23
|
-
$ctx.header.display = true;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
9
|
+
});
|
|
26
10
|
$:
|
|
27
11
|
style = createStyles(
|
|
28
12
|
{
|
|
29
|
-
"
|
|
13
|
+
height: !userClasses?.includes("q-header") && useSize(height).style
|
|
30
14
|
},
|
|
31
15
|
userStyles
|
|
32
16
|
);
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { QToolbarProps } from "./props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
inset?: boolean | undefined;
|
|
7
|
-
|
|
7
|
+
border?: boolean | undefined;
|
|
8
|
+
elevate?: boolean | undefined;
|
|
9
|
+
height?: number | `${number}px` | `${number}%` | `${number}em` | `${number}ex` | `${number}ch` | `${number}rem` | `${number}vw` | `${number}vh` | `${number}vmin` | `${number}vmax` | undefined;
|
|
8
10
|
class?: string | undefined;
|
|
9
11
|
style?: string | undefined;
|
|
10
12
|
};
|
|
@@ -15,9 +17,9 @@ declare const __propDef: {
|
|
|
15
17
|
default: {};
|
|
16
18
|
};
|
|
17
19
|
};
|
|
18
|
-
|
|
20
|
+
type QToolbarProps_ = typeof __propDef.props;
|
|
21
|
+
export { QToolbarProps_ as QToolbarProps };
|
|
19
22
|
export type QToolbarEvents = typeof __propDef.events;
|
|
20
23
|
export type QToolbarSlots = typeof __propDef.slots;
|
|
21
|
-
export default class QToolbar extends
|
|
24
|
+
export default class QToolbar extends SvelteComponent<QToolbarProps, QToolbarEvents, QToolbarSlots> {
|
|
22
25
|
}
|
|
23
|
-
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script>import { createClasses } from "../../utils/props";
|
|
2
|
+
export let shrink = false, userClasses = void 0, userStyles = void 0;
|
|
3
|
+
export { userClasses as class, userStyles as style };
|
|
4
|
+
$:
|
|
5
|
+
classes = createClasses([shrink && "shrink", userClasses], { component: "q-toolbar-title" });
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<div class={classes} {...$$restProps} style={userStyles}>
|
|
9
|
+
<slot />
|
|
10
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { QToolbarTitleProps } from "./props";
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
shrink?: boolean | undefined;
|
|
7
|
+
class?: string | undefined;
|
|
8
|
+
style?: string | undefined;
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {
|
|
14
|
+
default: {};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
type QToolbarTitleProps_ = typeof __propDef.props;
|
|
18
|
+
export { QToolbarTitleProps_ as QToolbarTitleProps };
|
|
19
|
+
export type QToolbarTitleEvents = typeof __propDef.events;
|
|
20
|
+
export type QToolbarTitleSlots = typeof __propDef.slots;
|
|
21
|
+
export default class QToolbarTitle extends SvelteComponent<QToolbarTitleProps, QToolbarTitleEvents, QToolbarTitleSlots> {
|
|
22
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { QToolbarDocsProps } from "./docs.props";
|
|
2
|
+
export let QToolbarDocs = {
|
|
3
|
+
name: "QToolbar",
|
|
4
|
+
description: "The Toolbar component is used to hold common actions and controls, often located at the top of an application or view.",
|
|
5
|
+
docs: {
|
|
6
|
+
props: QToolbarDocsProps,
|
|
7
|
+
slots: [],
|
|
8
|
+
methods: [],
|
|
9
|
+
events: [],
|
|
10
|
+
},
|
|
11
|
+
};
|
|
@@ -6,3 +6,11 @@ export declare const QToolbarDocsProps: {
|
|
|
6
6
|
description: string;
|
|
7
7
|
default: string;
|
|
8
8
|
}[];
|
|
9
|
+
export declare const QToolbarTitleDocsProps: {
|
|
10
|
+
name: string;
|
|
11
|
+
type: string;
|
|
12
|
+
optional: boolean;
|
|
13
|
+
clickableType: boolean;
|
|
14
|
+
description: string;
|
|
15
|
+
default: string;
|
|
16
|
+
}[];
|
|
@@ -1,7 +1,42 @@
|
|
|
1
1
|
.q-toolbar {
|
|
2
2
|
width: 100%;
|
|
3
|
+
padding: 0 1rem;
|
|
3
4
|
transition: all var(--speed3);
|
|
5
|
+
background-color: var(--surface);
|
|
6
|
+
|
|
7
|
+
nav {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: flex-start;
|
|
11
|
+
white-space: nowrap;
|
|
12
|
+
gap: 1rem;
|
|
13
|
+
|
|
14
|
+
> * {
|
|
15
|
+
margin: 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
4
19
|
&--inset {
|
|
5
20
|
padding-left: 58px;
|
|
6
21
|
}
|
|
22
|
+
|
|
23
|
+
&--elevated {
|
|
24
|
+
@include elevate(1, "bottom");
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&--bordered {
|
|
28
|
+
border-bottom: solid 0.0625rem var(--outline);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.q-toolbar-title {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex: auto;
|
|
35
|
+
font-size: 1.75rem;
|
|
36
|
+
font-weight: 400;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
|
|
39
|
+
&--shrink {
|
|
40
|
+
flex: unset;
|
|
41
|
+
}
|
|
7
42
|
}
|
|
@@ -1,6 +1,25 @@
|
|
|
1
|
-
import type { NativeProps } from "../../utils/types";
|
|
1
|
+
import type { NativeProps, CssValue } from "../../utils/types";
|
|
2
2
|
export interface QToolbarProps extends NativeProps {
|
|
3
|
+
/**
|
|
4
|
+
* @default false
|
|
5
|
+
*/
|
|
3
6
|
inset: boolean;
|
|
4
|
-
|
|
7
|
+
/**
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
border: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
elevate: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @default 64px
|
|
17
|
+
*/
|
|
18
|
+
height: CssValue | number;
|
|
19
|
+
}
|
|
20
|
+
export interface QToolbarTitleProps extends NativeProps {
|
|
21
|
+
/**
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
shrink: boolean;
|
|
5
25
|
}
|
|
6
|
-
export declare const QToolbarPropsDefaults: QToolbarProps;
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
export let value = void 0, position = "bottom", userClasses = "";
|
|
3
3
|
export { userClasses as class };
|
|
4
4
|
$:
|
|
5
|
-
classes = createClasses([
|
|
6
|
-
"q-tooltip
|
|
7
|
-
value !== false && "active",
|
|
8
|
-
position,
|
|
5
|
+
classes = createClasses([value && "active", position || "top"], {
|
|
6
|
+
component: "q-tooltip",
|
|
9
7
|
userClasses
|
|
10
|
-
|
|
8
|
+
});
|
|
11
9
|
</script>
|
|
12
10
|
|
|
13
11
|
<div class={classes} {...$$restProps}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { QTooltipProps } from "./props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
@@ -14,9 +14,9 @@ declare const __propDef: {
|
|
|
14
14
|
default: {};
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type QTooltipProps_ = typeof __propDef.props;
|
|
18
|
+
export { QTooltipProps_ as QTooltipProps };
|
|
18
19
|
export type QTooltipEvents = typeof __propDef.events;
|
|
19
20
|
export type QTooltipSlots = typeof __propDef.slots;
|
|
20
|
-
export default class QTooltip extends
|
|
21
|
+
export default class QTooltip extends SvelteComponent<QTooltipProps, QTooltipEvents, QTooltipSlots> {
|
|
21
22
|
}
|
|
22
|
-
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { QTooltipDocsProps } from "./docs.props";
|
|
2
|
+
export let QTooltipDocs = {
|
|
3
|
+
name: "QTooltip",
|
|
4
|
+
description: "The Tooltip component displays informative text on hover or focus, providing additional context.",
|
|
5
|
+
docs: {
|
|
6
|
+
props: QTooltipDocsProps,
|
|
7
|
+
slots: [],
|
|
8
|
+
methods: [],
|
|
9
|
+
events: [],
|
|
10
|
+
},
|
|
11
|
+
};
|
|
@@ -1,7 +1,82 @@
|
|
|
1
1
|
.q-tooltip {
|
|
2
|
+
--space: -0.5rem;
|
|
3
|
+
visibility: hidden;
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
gap: 0.5rem;
|
|
8
|
+
background-color: var(--inverse-surface);
|
|
9
|
+
color: var(--inverse-on-surface);
|
|
10
|
+
font-size: 0.75rem;
|
|
11
|
+
text-align: center;
|
|
12
|
+
border-radius: 0.25rem;
|
|
13
|
+
padding: 0.5rem;
|
|
14
|
+
position: absolute;
|
|
15
|
+
top: 0;
|
|
16
|
+
left: 50%;
|
|
17
|
+
bottom: auto;
|
|
18
|
+
right: auto;
|
|
19
|
+
transform: translate(-50%, -100%) scale(0.9);
|
|
20
|
+
width: auto;
|
|
21
|
+
white-space: nowrap;
|
|
22
|
+
font-weight: 500;
|
|
23
|
+
opacity: 0;
|
|
24
|
+
transition: var(--speed2) all;
|
|
2
25
|
z-index: 9999;
|
|
26
|
+
|
|
27
|
+
&--top {
|
|
28
|
+
margin-top: var(--space) !important;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&--right {
|
|
32
|
+
right: 0;
|
|
33
|
+
top: 50%;
|
|
34
|
+
bottom: auto;
|
|
35
|
+
left: auto;
|
|
36
|
+
transform: translate(100%, -50%) scale(0.9);
|
|
37
|
+
margin-right: var(--space) !important;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&--bottom {
|
|
41
|
+
bottom: 0;
|
|
42
|
+
left: 50%;
|
|
43
|
+
top: auto;
|
|
44
|
+
right: auto;
|
|
45
|
+
transform: translate(-50%, 100%) scale(0.9);
|
|
46
|
+
margin-bottom: var(--space) !important;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&--left {
|
|
50
|
+
margin-left: var(--space) !important;
|
|
51
|
+
|
|
52
|
+
left: 0;
|
|
53
|
+
top: 50%;
|
|
54
|
+
bottom: auto;
|
|
55
|
+
right: auto;
|
|
56
|
+
transform: translate(-100%, -50%) scale(0.9);
|
|
57
|
+
}
|
|
3
58
|
}
|
|
4
59
|
|
|
5
|
-
|
|
6
|
-
|
|
60
|
+
// Not easily integratable into the block above due to the :hover
|
|
61
|
+
:hover > .q-tooltip,
|
|
62
|
+
.q-tooltip--active {
|
|
63
|
+
visibility: visible;
|
|
64
|
+
opacity: 1;
|
|
65
|
+
|
|
66
|
+
&.q-tooltip {
|
|
67
|
+
&--top {
|
|
68
|
+
transform: translate(-50%, -100%) scale(1);
|
|
69
|
+
}
|
|
70
|
+
&--left {
|
|
71
|
+
transform: translate(-100%, -50%) scale(1);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&--right {
|
|
75
|
+
transform: translate(100%, -50%) scale(1);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&--bottom {
|
|
79
|
+
transform: translate(-50%, 100%) scale(1);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
7
82
|
}
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
export const UseAlignPropsDefaults = {
|
|
2
2
|
align: "top left",
|
|
3
3
|
};
|
|
4
|
+
const alignMap = {
|
|
5
|
+
left: "start",
|
|
6
|
+
center: "center",
|
|
7
|
+
right: "end",
|
|
8
|
+
between: "between",
|
|
9
|
+
around: "around",
|
|
10
|
+
evenly: "evenly",
|
|
11
|
+
// @todo - justify-stretch isn't possible
|
|
12
|
+
stretch: "stretch",
|
|
13
|
+
};
|
|
4
14
|
export default function useAlign(align = "top left") {
|
|
5
|
-
const
|
|
15
|
+
const alignments = align
|
|
6
16
|
.split(" ")
|
|
7
|
-
.map((
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
17
|
+
.map((entry) => {
|
|
18
|
+
const val = alignMap[entry];
|
|
19
|
+
return val ? `justify-${val}` : false;
|
|
20
|
+
})
|
|
21
|
+
.filter((entry) => typeof entry === "string");
|
|
22
|
+
return ["flex", ...alignments].join(" ");
|
|
12
23
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
export interface useSizeProps {
|
|
9
|
-
size?: string;
|
|
1
|
+
import { CssUnit, QuaffSizes } from "../utils/types";
|
|
2
|
+
export declare const sizes: QuaffSizes[];
|
|
3
|
+
export declare const CssUnits: CssUnit[];
|
|
4
|
+
interface UseSize {
|
|
5
|
+
class?: string;
|
|
6
|
+
style?: string;
|
|
10
7
|
}
|
|
11
|
-
export
|
|
8
|
+
export declare function useSize(sizeProp: any): UseSize;
|
|
9
|
+
export {};
|
|
@@ -1,13 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { isNumber } from "../utils/types";
|
|
2
|
+
export const sizes = ["xs", "sm", "md", "lg", "xl"];
|
|
3
|
+
export const CssUnits = ["px", "%", "em", "ex", "ch", "rem", "vw", "vh", "vmin", "vmax"];
|
|
4
|
+
export function useSize(sizeProp) {
|
|
5
|
+
if (isNumber(sizeProp) && sizeProp > 0) {
|
|
6
|
+
return {
|
|
7
|
+
style: `${sizeProp}px`,
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
else if (typeof sizeProp === "string") {
|
|
11
|
+
for (let unit of CssUnits) {
|
|
12
|
+
if (sizeProp.slice(-unit.length) === unit) {
|
|
13
|
+
return {
|
|
14
|
+
style: sizeProp,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
else if (sizes.includes(sizeProp)) {
|
|
18
|
+
return {
|
|
19
|
+
class: sizeProp,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return {};
|
|
13
25
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.flex {
|
|
2
|
+
display: flex !important;
|
|
3
|
+
flex-wrap: wrap;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.column {
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.items-center {
|
|
11
|
+
align-items: center;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.justify-center {
|
|
15
|
+
justify-content: center;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.justify-start {
|
|
19
|
+
justify-content: flex-start;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.justify-end {
|
|
23
|
+
justify-content: flex-end;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.justify-between {
|
|
27
|
+
justify-content: space-between;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.justify-around {
|
|
31
|
+
justify-content: space-around;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.justify-evenly {
|
|
35
|
+
justify-content: space-evenly;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.flex-center {
|
|
39
|
+
@extend .items-center;
|
|
40
|
+
@extend .justify-center;
|
|
41
|
+
}
|
package/dist/css/grid.scss
CHANGED
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
$grid-columns: 12;
|
|
3
|
-
$gutter-xs: 4px;
|
|
4
|
-
$gutter-sm: 8px;
|
|
5
|
-
$gutter-md: 16px;
|
|
6
|
-
$gutter-lg: 24px;
|
|
7
|
-
$gutter-xl: 48px;
|
|
8
|
-
|
|
9
|
-
// Responsive breakpoints
|
|
10
|
-
$breakpoints: (
|
|
11
|
-
xs: 0px,
|
|
12
|
-
sm: 600px,
|
|
13
|
-
md: 960px,
|
|
14
|
-
lg: 1280px,
|
|
15
|
-
xl: 1920px,
|
|
16
|
-
);
|
|
1
|
+
@import "./variables-sass.scss";
|
|
17
2
|
|
|
18
3
|
.row {
|
|
19
4
|
display: grid;
|