@quaffui/quaff 1.0.0-alpha1 → 1.0.0-beta1
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/README.md +1 -1
- package/dist/classes/Quaff.svelte.d.ts +12 -0
- package/dist/classes/Quaff.svelte.js +46 -0
- package/dist/components/card/QCard.scss +22 -0
- package/dist/components/card/QCard.svelte +13 -5
- package/dist/components/codeBlock/QCodeBlock.svelte +19 -6
- package/dist/components/drawer/QDrawer.scss +16 -0
- package/dist/components/drawer/QDrawer.svelte +213 -15
- package/dist/components/drawer/docs.props.js +7 -19
- package/dist/components/drawer/props.d.ts +6 -10
- package/dist/components/layout/QLayout.scss +10 -0
- package/dist/components/layout/QLayout.svelte +4 -4
- package/dist/components/list/QItemSection.scss +1 -0
- package/dist/components/private/QApi.svelte +2 -2
- package/dist/components/private/QDocs.svelte +21 -11
- package/dist/css/index.css +1 -1
- package/dist/css/index.scss +0 -4
- package/dist/css/mixins/_index.scss +1 -0
- package/dist/css/mixins/_responsive.scss +56 -0
- package/dist/css/shared/q-field.scss +3 -0
- package/dist/helpers/version.d.ts +1 -1
- package/dist/helpers/version.js +1 -1
- package/package.json +13 -13
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { setContext, type Snippet } from "svelte";
|
|
3
|
-
import { assets } from "$app/paths";
|
|
4
3
|
import { QCard, QCardSection, QTheme, Quaff } from "../..";
|
|
5
4
|
import { QColors, QDocsCtxName, type QComponentDocs } from "../../utils";
|
|
6
5
|
import QApi from "./QApi.svelte";
|
|
@@ -38,44 +37,54 @@
|
|
|
38
37
|
setContext(QDocsCtxName.snippets, () => snippets);
|
|
39
38
|
}
|
|
40
39
|
|
|
41
|
-
const image = $derived(`${assets}/cocktail-close-up.jpg`);
|
|
42
|
-
|
|
43
40
|
let principalDocument = Array.isArray(componentDocs)
|
|
44
41
|
? componentDocs[0]
|
|
45
42
|
: componentDocs;
|
|
43
|
+
|
|
44
|
+
const brightness = $derived(Quaff.darkMode.isActive ? 0.7 : 1.2);
|
|
46
45
|
</script>
|
|
47
46
|
|
|
48
|
-
<div
|
|
47
|
+
<div
|
|
48
|
+
class="q-docs"
|
|
49
|
+
style="padding: 1rem; --q-hue-rotate: {hueRotate}deg; --q-brightness: {brightness}; max-width: {Quaff
|
|
50
|
+
.breakpoints.lg}px; margin: auto;"
|
|
51
|
+
>
|
|
49
52
|
<div class="row q-gutter-lg" style="min-height: 400px">
|
|
50
53
|
<QCard
|
|
51
|
-
class="col-sm-12 col-lg-6
|
|
54
|
+
class="col-sm-12 col-xs-12 col-lg-6"
|
|
52
55
|
fill="primary"
|
|
53
56
|
style="min-height: 400px; align-content: center;"
|
|
54
57
|
>
|
|
55
|
-
<h1
|
|
58
|
+
<h1
|
|
59
|
+
class={[
|
|
60
|
+
"no-margin justify-center",
|
|
61
|
+
Quaff.breakpoints.isMoreThan("sm", true) ? "large" : "small",
|
|
62
|
+
]}
|
|
63
|
+
>
|
|
64
|
+
{docName || principalDocument?.name}
|
|
65
|
+
</h1>
|
|
56
66
|
<QCardSection class="q-docs__description flex flex-center">
|
|
57
67
|
<h3 class="q-docs__description-text">
|
|
58
|
-
{principalDocument?.description
|
|
68
|
+
{docDescription || principalDocument?.description}
|
|
59
69
|
</h3>
|
|
60
70
|
</QCardSection>
|
|
61
71
|
</QCard>
|
|
62
72
|
<QCard
|
|
63
|
-
class="q-docs__preview col-sm-12 col-lg-6 q-mt-none q-pa-none"
|
|
73
|
+
class="q-docs__preview col-sm-12 col-xs-12 col-lg-6 q-mt-none q-pa-none"
|
|
64
74
|
fill="secondary"
|
|
65
75
|
style="min-height: 400px"
|
|
66
76
|
>
|
|
67
77
|
<QCardSection class="q-pa-none">
|
|
68
78
|
<div
|
|
69
|
-
class="flex flex-center"
|
|
79
|
+
class="flex flex-center column"
|
|
70
80
|
style="position: absolute; height: 100%; width: 100%; z-index: 1; overflow: hidden;"
|
|
71
81
|
>
|
|
72
82
|
{@render display?.()}
|
|
73
83
|
</div>
|
|
74
84
|
<img
|
|
75
85
|
class="q-docs__image"
|
|
76
|
-
src=
|
|
86
|
+
src="/cocktail-close-up.jpg"
|
|
77
87
|
alt="Close-up of the content of a cocktail"
|
|
78
|
-
style={`filter: hue-rotate(${hueRotate}deg) ${isDark ? "brightness(0.7)" : "brightness(1.2)"}`}
|
|
79
88
|
/>
|
|
80
89
|
</QCardSection>
|
|
81
90
|
</QCard>
|
|
@@ -119,6 +128,7 @@
|
|
|
119
128
|
width: 100%;
|
|
120
129
|
height: 25rem;
|
|
121
130
|
object-fit: cover;
|
|
131
|
+
filter: hue-rotate(var(--q-hue-rotate)) brightness(var(--q-brightness));
|
|
122
132
|
}
|
|
123
133
|
.q-docs :global(.q-docs__preview) {
|
|
124
134
|
display: flex !important;
|