@quaffui/quaff 0.1.0-prealpha6 → 0.1.0-prealpha8
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/props.d.ts +2 -2
- package/dist/components/button/QBtn.svelte +6 -3
- package/dist/components/button/QBtn.svelte.d.ts +1 -0
- package/dist/components/button/docs.props.js +8 -0
- package/dist/components/button/index.scss +1 -1
- package/dist/components/button/props.d.ts +7 -2
- package/dist/components/card/docs.props.js +1 -1
- package/dist/components/checkbox/index.scss +4 -0
- package/dist/components/chip/QChip.svelte +8 -2
- package/dist/components/chip/docs.props.js +3 -3
- package/dist/components/chip/props.d.ts +2 -2
- package/dist/components/codeBlock/QCodeBlock.svelte +1 -1
- package/dist/components/dialog/QDialog.svelte +7 -8
- package/dist/components/dialog/docs.props.js +10 -2
- package/dist/components/dialog/index.scss +150 -3
- package/dist/components/drawer/QDrawer.svelte +3 -2
- package/dist/components/drawer/QDrawer.svelte.d.ts +1 -0
- package/dist/components/drawer/props.d.ts +2 -2
- package/dist/components/footer/QFooter.svelte +13 -3
- package/dist/components/footer/props.d.ts +2 -2
- package/dist/components/icon/QIcon.svelte +11 -13
- package/dist/components/icon/QIcon.svelte.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 +2 -1
- package/dist/components/index.js +2 -1
- package/dist/components/list/QItem.svelte +1 -1
- 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 +6 -0
- package/dist/components/private/QApi.svelte +21 -20
- package/dist/components/private/QDocs.svelte +38 -10
- package/dist/components/private/QDocsSection.svelte +2 -2
- package/dist/components/progress/QCircularProgress.svelte +4 -3
- package/dist/components/progress/QCircularProgress.svelte.d.ts +1 -1
- package/dist/components/progress/QLinearProgress.svelte +8 -2
- 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/railbar/QRailbar.svelte +2 -1
- package/dist/components/railbar/QRailbar.svelte.d.ts +1 -1
- package/dist/components/railbar/docs.d.ts +2 -0
- package/dist/components/railbar/docs.js +11 -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/docs.props.js +2 -2
- package/dist/components/separator/docs.d.ts +2 -0
- package/dist/components/separator/docs.js +11 -0
- 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/toolbar/QToolbar.svelte +2 -1
- package/dist/components/toolbar/QToolbar.svelte.d.ts +1 -1
- 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 +27 -0
- package/dist/components/toolbar/props.d.ts +14 -3
- package/dist/components/toolbar/props.js +1 -6
- package/dist/components/tooltip/QTooltip.svelte +3 -5
- 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-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 -1
- package/dist/css/index.scss +3 -22
- 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/helpers/version.d.ts +1 -1
- package/dist/helpers/version.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/utils/types.d.ts +3 -0
- package/dist/utils/types.json +1 -1
- package/package.json +5 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script>import { createClasses, createStyles } from "../../utils/props";
|
|
2
2
|
import { getContext } from "svelte";
|
|
3
3
|
import { isNumber } from "../../utils/types";
|
|
4
|
+
import { useSize } from "../../composables/use-size";
|
|
4
5
|
export let inset = false, height = "64px", userClasses = void 0, userStyles = void 0;
|
|
5
6
|
export { userClasses as class, userStyles as style };
|
|
6
7
|
let ctx = getContext("layout");
|
|
@@ -14,7 +15,7 @@ $:
|
|
|
14
15
|
userClasses
|
|
15
16
|
]);
|
|
16
17
|
$:
|
|
17
|
-
heightStyle = ctx
|
|
18
|
+
heightStyle = $ctx && useSize(height).style;
|
|
18
19
|
$:
|
|
19
20
|
if ($ctx?.header !== void 0) {
|
|
20
21
|
if (userStyles?.includes("display: none")) {
|
|
@@ -4,7 +4,7 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
inset?: boolean | undefined;
|
|
7
|
-
height?:
|
|
7
|
+
height?: number | `${number}px` | `${number}%` | `${number}em` | `${number}ex` | `${number}ch` | `${number}rem` | `${number}vw` | `${number}vh` | `${number}vmin` | `${number}vmax` | undefined;
|
|
8
8
|
class?: string | undefined;
|
|
9
9
|
style?: string | undefined;
|
|
10
10
|
};
|
|
@@ -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,34 @@
|
|
|
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
|
}
|
|
7
22
|
}
|
|
23
|
+
|
|
24
|
+
.q-toolbar-title {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex: auto;
|
|
27
|
+
font-size: 1.75rem;
|
|
28
|
+
font-weight: 400;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
|
|
31
|
+
&--shrink {
|
|
32
|
+
flex: unset;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,6 +1,17 @@
|
|
|
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 64px
|
|
9
|
+
*/
|
|
10
|
+
height: CssValue | number;
|
|
11
|
+
}
|
|
12
|
+
export interface QToolbarTitleProps extends NativeProps {
|
|
13
|
+
/**
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
shrink: boolean;
|
|
5
17
|
}
|
|
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}>
|
|
@@ -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;
|