@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
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import { useSize } from "../../composables/use-size";
|
|
2
|
+
import { createClasses, createStyles } from "../../utils/props";
|
|
2
3
|
export let shape = "circle", size = "md", src = void 0, video = false, userClasses = void 0, userStyles = void 0;
|
|
3
4
|
export { userClasses as class };
|
|
4
5
|
export { userStyles as style };
|
|
5
6
|
$:
|
|
6
|
-
|
|
7
|
+
sizeObj = useSize(size);
|
|
7
8
|
$:
|
|
8
9
|
shapeClass = createClasses([
|
|
9
10
|
shape === "circle" && "circle",
|
|
@@ -14,18 +15,18 @@ $:
|
|
|
14
15
|
shape.includes("right") && "right-round"
|
|
15
16
|
]);
|
|
16
17
|
$:
|
|
17
|
-
classes = createClasses([shapeClass,
|
|
18
|
+
classes = createClasses([shapeClass, sizeObj.class], {
|
|
18
19
|
component: "q-avatar",
|
|
19
20
|
userClasses
|
|
20
21
|
});
|
|
21
22
|
$:
|
|
22
|
-
style =
|
|
23
|
+
style = createStyles(
|
|
23
24
|
{
|
|
24
|
-
width:
|
|
25
|
-
height:
|
|
25
|
+
width: sizeObj.style,
|
|
26
|
+
height: sizeObj.style
|
|
26
27
|
},
|
|
27
28
|
userStyles
|
|
28
|
-
)
|
|
29
|
+
);
|
|
29
30
|
</script>
|
|
30
31
|
|
|
31
32
|
{#if video === true}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { QAvatarProps } from "./props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
@@ -19,9 +19,9 @@ declare const __propDef: {
|
|
|
19
19
|
default: {};
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
type QAvatarProps_ = typeof __propDef.props;
|
|
23
|
+
export { QAvatarProps_ as QAvatarProps };
|
|
23
24
|
export type QAvatarEvents = typeof __propDef.events;
|
|
24
25
|
export type QAvatarSlots = typeof __propDef.slots;
|
|
25
|
-
export default class QAvatar extends
|
|
26
|
+
export default class QAvatar extends SvelteComponent<QAvatarProps, QAvatarEvents, QAvatarSlots> {
|
|
26
27
|
}
|
|
27
|
-
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "
|
|
1
|
+
import type { QComponentDocs } from "../../utils/types";
|
|
2
2
|
export declare let QAvatarDocs: QComponentDocs;
|
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
object-fit: cover;
|
|
4
4
|
object-position: center;
|
|
5
5
|
aspect-ratio: 1;
|
|
6
|
-
transition:
|
|
6
|
+
transition:
|
|
7
|
+
var(--speed3) transform,
|
|
8
|
+
var(--speed3) border-radius,
|
|
9
|
+
var(--speed3) padding;
|
|
7
10
|
border-radius: 0;
|
|
8
11
|
|
|
9
12
|
display: flex;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { NativeProps } from "../../utils/types";
|
|
1
|
+
import type { QuaffSizes, CssValue, NativeProps } from "../../utils/types";
|
|
2
2
|
export type QAvatarShapeOptions = "circle" | "rounded" | "top-round" | "left-round" | "right-round" | "bottom-round" | "top-left-round" | "top-right-round" | "bottom-left-round" | "bottom-right-round";
|
|
3
|
-
export type QAvatarSizeOptions =
|
|
3
|
+
export type QAvatarSizeOptions = QuaffSizes | CssValue | number;
|
|
4
4
|
export interface QAvatarProps extends NativeProps {
|
|
5
5
|
/**
|
|
6
6
|
* Shape of the avatar.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { QBreadcrumbsProps } from "./props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
@@ -15,9 +15,9 @@ declare const __propDef: {
|
|
|
15
15
|
default: {};
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
type QBreadcrumbsProps_ = typeof __propDef.props;
|
|
19
|
+
export { QBreadcrumbsProps_ as QBreadcrumbsProps };
|
|
19
20
|
export type QBreadcrumbsEvents = typeof __propDef.events;
|
|
20
21
|
export type QBreadcrumbsSlots = typeof __propDef.slots;
|
|
21
|
-
export default class QBreadcrumbs extends
|
|
22
|
+
export default class QBreadcrumbs extends SvelteComponent<QBreadcrumbsProps, QBreadcrumbsEvents, QBreadcrumbsSlots> {
|
|
22
23
|
}
|
|
23
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { QBreadcrumbsElProps } from "./props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
@@ -18,9 +18,9 @@ declare const __propDef: {
|
|
|
18
18
|
default: {};
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
type QBreadcrumbsElProps_ = typeof __propDef.props;
|
|
22
|
+
export { QBreadcrumbsElProps_ as QBreadcrumbsElProps };
|
|
22
23
|
export type QBreadcrumbsElEvents = typeof __propDef.events;
|
|
23
24
|
export type QBreadcrumbsElSlots = typeof __propDef.slots;
|
|
24
|
-
export default class QBreadcrumbsEl extends
|
|
25
|
+
export default class QBreadcrumbsEl extends SvelteComponent<QBreadcrumbsElProps, QBreadcrumbsElEvents, QBreadcrumbsElSlots> {
|
|
25
26
|
}
|
|
26
|
-
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "
|
|
1
|
+
import type { QComponentDocs } from "../../utils/types";
|
|
2
2
|
export declare let QBreadcrumbsDocs: QComponentDocs;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
<script>import { createClasses } from "../../utils/props";
|
|
2
|
-
import { createEventDispatcher } from "svelte";
|
|
2
|
+
import { createEventDispatcher, onMount } from "svelte";
|
|
3
3
|
import QIcon from "../icon/QIcon.svelte";
|
|
4
4
|
import QCircularProgress from "../progress/QCircularProgress.svelte";
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { useSize } from "../../composables/use-size";
|
|
6
|
+
import { isActivationKey } from "../../utils/events";
|
|
7
|
+
import { ripple } from "../../helpers/ripple";
|
|
8
|
+
export let icon = void 0, label = void 0, disable = false, loading = false, unelevated = false, outline = false, round = false, rectangle = false, flat = false, to = void 0, size = void 0, userClasses = void 0;
|
|
7
9
|
export { userClasses as class };
|
|
8
|
-
|
|
10
|
+
let qBtn;
|
|
9
11
|
let tag;
|
|
10
12
|
$:
|
|
11
|
-
tag = to !== void 0 ? "a" : "
|
|
13
|
+
tag = to !== void 0 ? "a" : "button";
|
|
14
|
+
$:
|
|
15
|
+
sizeObj = useSize(size);
|
|
12
16
|
$:
|
|
13
17
|
classes = createClasses(
|
|
14
18
|
[
|
|
@@ -16,24 +20,34 @@ $:
|
|
|
16
20
|
rectangle && "rectangle",
|
|
17
21
|
outline && "outlined",
|
|
18
22
|
flat && "flat",
|
|
19
|
-
!$$slots.default && !label && "
|
|
20
|
-
size
|
|
23
|
+
(!$$slots.default && !label || round) && "round",
|
|
24
|
+
size !== "md" && sizeObj.class
|
|
21
25
|
],
|
|
22
26
|
{
|
|
23
27
|
component: "q-btn",
|
|
24
28
|
userClasses
|
|
25
29
|
}
|
|
26
30
|
);
|
|
31
|
+
function onKeyDown(e) {
|
|
32
|
+
if (!isActivationKey(e))
|
|
33
|
+
return;
|
|
34
|
+
e.preventDefault();
|
|
35
|
+
let click = new MouseEvent("click");
|
|
36
|
+
qBtn.dispatchEvent(click);
|
|
37
|
+
}
|
|
27
38
|
</script>
|
|
28
39
|
|
|
29
40
|
<svelte:element
|
|
30
41
|
this={tag}
|
|
31
|
-
|
|
32
|
-
|
|
42
|
+
bind:this={qBtn}
|
|
43
|
+
use:ripple
|
|
44
|
+
role={tag === "a" ? "button" : undefined}
|
|
33
45
|
href={to}
|
|
34
46
|
class={classes}
|
|
35
47
|
aria-disabled={disable || undefined}
|
|
36
48
|
tabindex={disable ? -1 : 0}
|
|
49
|
+
on:click
|
|
50
|
+
on:keydown={onKeyDown}
|
|
37
51
|
{...$$restProps}
|
|
38
52
|
>
|
|
39
53
|
{#if icon && !loading}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { QBtnProps } from "./props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
@@ -9,6 +9,7 @@ declare const __propDef: {
|
|
|
9
9
|
loading?: QBtnProps["loading"];
|
|
10
10
|
unelevated?: QBtnProps["unelevated"];
|
|
11
11
|
outline?: QBtnProps["outline"];
|
|
12
|
+
round?: QBtnProps["round"];
|
|
12
13
|
rectangle?: QBtnProps["rectangle"];
|
|
13
14
|
flat?: QBtnProps["flat"];
|
|
14
15
|
to?: QBtnProps["to"];
|
|
@@ -16,7 +17,7 @@ declare const __propDef: {
|
|
|
16
17
|
class?: string | undefined;
|
|
17
18
|
};
|
|
18
19
|
events: {
|
|
19
|
-
|
|
20
|
+
click: MouseEvent;
|
|
20
21
|
} & {
|
|
21
22
|
[evt: string]: CustomEvent<any>;
|
|
22
23
|
};
|
|
@@ -24,9 +25,9 @@ declare const __propDef: {
|
|
|
24
25
|
default: {};
|
|
25
26
|
};
|
|
26
27
|
};
|
|
27
|
-
|
|
28
|
+
type QBtnProps_ = typeof __propDef.props;
|
|
29
|
+
export { QBtnProps_ as QBtnProps };
|
|
28
30
|
export type QBtnEvents = typeof __propDef.events;
|
|
29
31
|
export type QBtnSlots = typeof __propDef.slots;
|
|
30
|
-
export default class QBtn extends
|
|
32
|
+
export default class QBtn extends SvelteComponent<QBtnProps, QBtnEvents, QBtnSlots> {
|
|
31
33
|
}
|
|
32
|
-
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "
|
|
1
|
+
import type { QComponentDocs } from "../../utils/types";
|
|
2
2
|
export declare let QBtnDocs: QComponentDocs;
|
|
@@ -55,6 +55,14 @@ export const QBtnDocsProps = [
|
|
|
55
55
|
description: "Use rectangle design for the button, removing the large border-radius.",
|
|
56
56
|
default: "false",
|
|
57
57
|
},
|
|
58
|
+
{
|
|
59
|
+
name: "round",
|
|
60
|
+
type: "boolean",
|
|
61
|
+
optional: true,
|
|
62
|
+
clickableType: false,
|
|
63
|
+
description: "Use round design for the button, giving it a circular shape.",
|
|
64
|
+
default: "false",
|
|
65
|
+
},
|
|
58
66
|
{
|
|
59
67
|
name: "to",
|
|
60
68
|
type: "string",
|
|
@@ -18,12 +18,14 @@
|
|
|
18
18
|
background-color: var(--primary);
|
|
19
19
|
margin: 0 0.5rem;
|
|
20
20
|
border-radius: 1.25rem;
|
|
21
|
-
transition:
|
|
21
|
+
transition:
|
|
22
|
+
var(--speed3) transform,
|
|
23
|
+
var(--speed3) border-radius,
|
|
24
|
+
var(--speed3) padding;
|
|
22
25
|
user-select: none;
|
|
23
26
|
gap: 1rem;
|
|
24
27
|
line-height: normal;
|
|
25
28
|
@extend .elevate-sm-bottom;
|
|
26
|
-
@extend .ripple;
|
|
27
29
|
|
|
28
30
|
$sizeMap: (
|
|
29
31
|
"sm": -1,
|
|
@@ -63,7 +65,7 @@
|
|
|
63
65
|
border-radius: 0.5rem;
|
|
64
66
|
}
|
|
65
67
|
|
|
66
|
-
&.q-btn--
|
|
68
|
+
&.q-btn--round {
|
|
67
69
|
width: 2.5rem;
|
|
68
70
|
height: 2.5rem;
|
|
69
71
|
border-radius: 50%;
|
|
@@ -74,5 +76,23 @@
|
|
|
74
76
|
margin: 0 -0.5rem;
|
|
75
77
|
}
|
|
76
78
|
|
|
79
|
+
&:is(:hover, :focus):not([aria-disabled])::after {
|
|
80
|
+
content: "";
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: 0;
|
|
83
|
+
left: 0;
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 100%;
|
|
86
|
+
background-color: var(--on-primary);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&:hover:not([aria-disabled])::after {
|
|
90
|
+
opacity: 0.08;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:focus:not([aria-disabled])::after {
|
|
94
|
+
opacity: 0.16;
|
|
95
|
+
}
|
|
96
|
+
|
|
77
97
|
@include btn-image;
|
|
78
98
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { NativeProps } from "
|
|
2
|
-
export type QBtnSizeOptions =
|
|
1
|
+
import type { NativeProps, QuaffSizes } from "../../utils/types";
|
|
2
|
+
export type QBtnSizeOptions = Exclude<QuaffSizes, "xs">;
|
|
3
3
|
export interface QBtnProps extends NativeProps {
|
|
4
4
|
/**
|
|
5
5
|
* Puts the button in a disabled state, making it unclickable.
|
|
@@ -36,6 +36,11 @@ export interface QBtnProps extends NativeProps {
|
|
|
36
36
|
* @default false
|
|
37
37
|
*/
|
|
38
38
|
rectangle?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Use round design for the button, giving it a circular shape.
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
round?: boolean;
|
|
39
44
|
/**
|
|
40
45
|
* Makes the button navigational. Can be used with the router (e.g to="/home") or as a normal href attribute (e.g to="#section-id").
|
|
41
46
|
* @default undefined
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script>import { createClasses } from "
|
|
1
|
+
<script>import { createClasses } from "../../utils/props";
|
|
2
2
|
export let bordered = false, fill = void 0, flat = false, round = false, title = void 0, userClasses = void 0;
|
|
3
3
|
export { userClasses as class };
|
|
4
4
|
const colorOptions = ["primary", "secondary", "tertiary"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { QCardProps } from "./props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
@@ -18,9 +18,9 @@ declare const __propDef: {
|
|
|
18
18
|
default: {};
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
type QCardProps_ = typeof __propDef.props;
|
|
22
|
+
export { QCardProps_ as QCardProps };
|
|
22
23
|
export type QCardEvents = typeof __propDef.events;
|
|
23
24
|
export type QCardSlots = typeof __propDef.slots;
|
|
24
|
-
export default class QCard extends
|
|
25
|
+
export default class QCard extends SvelteComponent<QCardProps, QCardEvents, QCardSlots> {
|
|
25
26
|
}
|
|
26
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { QCardActionsProps } 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 QCardActionsProps_ = typeof __propDef.props;
|
|
18
|
+
export { QCardActionsProps_ as QCardActionsProps };
|
|
18
19
|
export type QCardActionsEvents = typeof __propDef.events;
|
|
19
20
|
export type QCardActionsSlots = typeof __propDef.slots;
|
|
20
|
-
export default class QCardActions extends
|
|
21
|
+
export default class QCardActions extends SvelteComponent<QCardActionsProps, QCardActionsEvents, QCardActionsSlots> {
|
|
21
22
|
}
|
|
22
|
-
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { QCardSectionProps } from "./props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
@@ -15,9 +15,9 @@ declare const __propDef: {
|
|
|
15
15
|
default: {};
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
type QCardSectionProps_ = typeof __propDef.props;
|
|
19
|
+
export { QCardSectionProps_ as QCardSectionProps };
|
|
19
20
|
export type QCardSectionEvents = typeof __propDef.events;
|
|
20
21
|
export type QCardSectionSlots = typeof __propDef.slots;
|
|
21
|
-
export default class QCardSection extends
|
|
22
|
+
export default class QCardSection extends SvelteComponent<QCardSectionProps, QCardSectionEvents, QCardSectionSlots> {
|
|
22
23
|
}
|
|
23
|
-
export {};
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
.q-card {
|
|
3
3
|
display: block;
|
|
4
4
|
border-radius: 0.75rem;
|
|
5
|
-
transition:
|
|
5
|
+
transition:
|
|
6
|
+
var(--speed-3) transform,
|
|
7
|
+
var(--speed-3) padding,
|
|
8
|
+
var(--speed-3) border-radius;
|
|
6
9
|
@include padding("a", "md");
|
|
7
10
|
@extend .elevate-sm-bottom;
|
|
8
11
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { QCheckboxProps } from "./props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
@@ -13,9 +13,9 @@ declare const __propDef: {
|
|
|
13
13
|
};
|
|
14
14
|
slots: {};
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
type QCheckboxProps_ = typeof __propDef.props;
|
|
17
|
+
export { QCheckboxProps_ as QCheckboxProps };
|
|
17
18
|
export type QCheckboxEvents = typeof __propDef.events;
|
|
18
19
|
export type QCheckboxSlots = typeof __propDef.slots;
|
|
19
|
-
export default class QCheckbox extends
|
|
20
|
+
export default class QCheckbox extends SvelteComponent<QCheckboxProps, QCheckboxEvents, QCheckboxSlots> {
|
|
20
21
|
}
|
|
21
|
-
export {};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { createClasses } from "../../utils/props";
|
|
3
3
|
import { createEventDispatcher } from "svelte";
|
|
4
4
|
import QIcon from "../icon/QIcon.svelte";
|
|
5
|
+
import { useSize } from "../../composables/use-size";
|
|
5
6
|
export let content = void 0, icon = void 0, iconRight = void 0, disable = false, responsive = false, vertical = false, round = false, outlined = false, size = "md", tabindex = void 0, href = void 0, userClasses = void 0;
|
|
6
7
|
export { userClasses as class };
|
|
7
8
|
const emit = createEventDispatcher();
|
|
@@ -10,10 +11,15 @@ $:
|
|
|
10
11
|
$:
|
|
11
12
|
imgRight = iconRight?.startsWith("img:") ? iconRight.slice(4) : void 0;
|
|
12
13
|
$:
|
|
13
|
-
|
|
14
|
+
sizeObj = useSize(size);
|
|
14
15
|
$:
|
|
15
16
|
classes = createClasses(
|
|
16
|
-
[
|
|
17
|
+
[
|
|
18
|
+
vertical && "vertical",
|
|
19
|
+
round && "rounded",
|
|
20
|
+
(outlined || disable) && "bordered",
|
|
21
|
+
size !== "md" && sizeObj.class
|
|
22
|
+
],
|
|
17
23
|
{
|
|
18
24
|
component: "q-chip",
|
|
19
25
|
userClasses
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { QChipProps } from "./props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
@@ -27,9 +27,9 @@ declare const __propDef: {
|
|
|
27
27
|
trailing: {};
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
-
|
|
30
|
+
type QChipProps_ = typeof __propDef.props;
|
|
31
|
+
export { QChipProps_ as QChipProps };
|
|
31
32
|
export type QChipEvents = typeof __propDef.events;
|
|
32
33
|
export type QChipSlots = typeof __propDef.slots;
|
|
33
|
-
export default class QChip extends
|
|
34
|
+
export default class QChip extends SvelteComponent<QChipProps, QChipEvents, QChipSlots> {
|
|
34
35
|
}
|
|
35
|
-
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "
|
|
1
|
+
import type { QComponentDocs } from "../../utils/types";
|
|
2
2
|
export declare let QChipDocs: QComponentDocs;
|
|
@@ -65,15 +65,15 @@ export const QChipDocsProps = [
|
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
name: "size",
|
|
68
|
-
type:
|
|
68
|
+
type: "QChipSizeOptions",
|
|
69
69
|
optional: true,
|
|
70
|
-
clickableType:
|
|
70
|
+
clickableType: true,
|
|
71
71
|
description: "Size of the chip.",
|
|
72
72
|
default: "small",
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
name: "tabindex",
|
|
76
|
-
type: "
|
|
76
|
+
type: "number",
|
|
77
77
|
optional: true,
|
|
78
78
|
clickableType: false,
|
|
79
79
|
description: "Tabindex of the chip.",
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
color: var(--on-secondary);
|
|
13
13
|
text-transform: none;
|
|
14
14
|
border-radius: 0.5em;
|
|
15
|
-
transition:
|
|
15
|
+
transition:
|
|
16
|
+
var(--speed3) transform,
|
|
17
|
+
var(--speed3) border-radius,
|
|
18
|
+
var(--speed3) padding;
|
|
16
19
|
line-height: normal;
|
|
17
20
|
text-decoration: none;
|
|
18
21
|
cursor: pointer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { NativeProps } from "../../utils/types";
|
|
2
|
-
export type QChipSizeOptions =
|
|
1
|
+
import type { NativeProps, QuaffSizes } from "../../utils/types";
|
|
2
|
+
export type QChipSizeOptions = Exclude<QuaffSizes, "xs" | "xl">;
|
|
3
3
|
export interface QChipProps extends NativeProps {
|
|
4
4
|
/**
|
|
5
5
|
* The content inside the chip. Will overwrite the default slot.
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
import "prism-svelte";
|
|
1
|
+
<script>import Highlight from "svelte-highlight";
|
|
2
|
+
import typescript from "svelte-highlight/languages/typescript";
|
|
3
|
+
import "svelte-highlight/styles/material.css";
|
|
5
4
|
import { QBtn } from "../..";
|
|
6
5
|
export let language, code = "/* No code found */", title = void 0, copiable = void 0;
|
|
7
6
|
let btnContent = "Copy";
|
|
8
7
|
let btnColor = "primary";
|
|
9
|
-
$:
|
|
10
|
-
highlighted = Prism.highlight(code, Prism.languages[language], language);
|
|
11
8
|
async function copyCode() {
|
|
12
9
|
try {
|
|
13
10
|
if (navigator.clipboard.write) {
|
|
@@ -36,8 +33,10 @@ async function copyCode() {
|
|
|
36
33
|
|
|
37
34
|
<div class="q-code-block">
|
|
38
35
|
{#if copiable}
|
|
39
|
-
<div class="flex between-
|
|
40
|
-
|
|
36
|
+
<div class="flex justify-between {title ? 'items-center' : 'justify-end'} q-pb-sm">
|
|
37
|
+
{#if title}
|
|
38
|
+
<h4 class="q-ma-none q-pr-lg">{title}</h4>
|
|
39
|
+
{/if}
|
|
41
40
|
<QBtn
|
|
42
41
|
class="{btnColor}-border {btnColor}-text"
|
|
43
42
|
size="sm"
|
|
@@ -51,7 +50,7 @@ async function copyCode() {
|
|
|
51
50
|
{:else if title}
|
|
52
51
|
<h4>{title}</h4>
|
|
53
52
|
{/if}
|
|
54
|
-
<
|
|
53
|
+
<Highlight language={typescript} {code} />
|
|
55
54
|
</div>
|
|
56
55
|
|
|
57
56
|
<style>
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import "prismjs/components/prism-typescript";
|
|
4
|
-
import "prism-svelte";
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import "svelte-highlight/styles/material.css";
|
|
5
3
|
import type { QCodeBlockProps } from "./props";
|
|
6
4
|
declare const __propDef: {
|
|
7
5
|
props: {
|
|
@@ -15,9 +13,9 @@ declare const __propDef: {
|
|
|
15
13
|
};
|
|
16
14
|
slots: {};
|
|
17
15
|
};
|
|
18
|
-
|
|
16
|
+
type QCodeBlockProps_ = typeof __propDef.props;
|
|
17
|
+
export { QCodeBlockProps_ as QCodeBlockProps };
|
|
19
18
|
export type QCodeBlockEvents = typeof __propDef.events;
|
|
20
19
|
export type QCodeBlockSlots = typeof __propDef.slots;
|
|
21
|
-
export default class QCodeBlock extends
|
|
20
|
+
export default class QCodeBlock extends SvelteComponent<QCodeBlockProps, QCodeBlockEvents, QCodeBlockSlots> {
|
|
22
21
|
}
|
|
23
|
-
export {};
|