@quaffui/quaff 0.1.0-prealpha → 0.1.0-prealpha11
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 +5 -5
- 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/card/props.d.ts +1 -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 +57 -40
- 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 +8 -8
- 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 +6 -6
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.js +3 -1
- package/dist/components/input/QInput.svelte.d.ts +10 -10
- package/dist/components/input/docs.d.ts +1 -1
- package/dist/components/input/props.d.ts +7 -7
- package/dist/components/layout/QLayout.svelte.d.ts +11 -11
- package/dist/components/layout/docs.d.ts +1 -1
- package/dist/components/layout/index.scss +93 -76
- package/dist/components/layout/props.d.ts +7 -7
- package/dist/components/list/QItem.svelte +1 -1
- package/dist/components/list/QItem.svelte.d.ts +9 -9
- package/dist/components/list/QItemSection.svelte.d.ts +5 -5
- package/dist/components/list/QList.svelte.d.ts +10 -17
- 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/list/props.d.ts +12 -12
- 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 +7 -7
- package/dist/components/progress/QLinearProgress.svelte +8 -2
- package/dist/components/progress/QLinearProgress.svelte.d.ts +6 -6
- 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 +30 -13
- package/dist/components/progress/props.js +1 -7
- package/dist/components/radio/QRadio.svelte.d.ts +6 -6
- package/dist/components/radio/docs.d.ts +1 -1
- package/dist/components/radio/props.d.ts +3 -3
- package/dist/components/railbar/QRailbar.svelte +48 -29
- package/dist/components/railbar/QRailbar.svelte.d.ts +7 -7
- 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 +13 -5
- package/dist/components/railbar/props.js +1 -7
- package/dist/components/select/QSelect.svelte +6 -4
- package/dist/components/select/QSelect.svelte.d.ts +7 -7
- 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 +4 -4
- package/dist/components/select/props.js +0 -1
- package/dist/components/separator/QSeparator.svelte +1 -1
- package/dist/components/separator/QSeparator.svelte.d.ts +9 -9
- package/dist/components/separator/docs.d.ts +2 -0
- package/dist/components/separator/docs.js +11 -0
- package/dist/components/separator/props.d.ts +10 -10
- package/dist/components/table/QTable.svelte.d.ts +5 -5
- package/dist/components/table/docs.d.ts +1 -1
- package/dist/components/table/props.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 +6 -6
- 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/tabs/props.d.ts +2 -2
- 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 +8 -6
- 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 +23 -4
- package/dist/components/toolbar/props.js +1 -6
- package/dist/components/tooltip/QTooltip.svelte +3 -5
- package/dist/components/tooltip/QTooltip.svelte.d.ts +5 -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/components/tooltip/props.d.ts +1 -1
- 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 +647 -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 +3 -3
- package/dist/stores/QTheme.js +22 -15
- 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
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
QDrawer,
|
|
12
12
|
QCodeBlock
|
|
13
13
|
} from "../..";
|
|
14
|
-
import Types from "
|
|
14
|
+
import Types from "../../utils/types.json";
|
|
15
15
|
export let QComponentDocs;
|
|
16
16
|
let api = QComponentDocs.map((_doc) => "props");
|
|
17
17
|
let drawer = Object.fromEntries(
|
|
@@ -34,28 +34,28 @@ function getType(type) {
|
|
|
34
34
|
let found = type in Types ? Types[type] : void 0;
|
|
35
35
|
return found;
|
|
36
36
|
}
|
|
37
|
-
function handleDrawer(QDocument, doc) {
|
|
37
|
+
function handleDrawer(QDocument, doc, e) {
|
|
38
|
+
e.stopPropagation();
|
|
38
39
|
let content = getType(doc.type);
|
|
40
|
+
for (let docName in drawer[QDocument.name]) {
|
|
41
|
+
if (drawer[QDocument.name][docName] === true && docName !== doc.name) {
|
|
42
|
+
drawer[QDocument.name][docName] = false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
39
45
|
if (!drawer[QDocument.name][doc.name]) {
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
setTimeout(() => {
|
|
47
|
+
drawerContent = content;
|
|
48
|
+
drawer[QDocument.name][doc.name] = true;
|
|
49
|
+
}, 100);
|
|
42
50
|
} else {
|
|
43
|
-
|
|
44
|
-
drawer[QDocument.name][doc.name] = false;
|
|
45
|
-
setTimeout(() => {
|
|
46
|
-
drawerContent = content;
|
|
47
|
-
drawer[QDocument.name][doc.name] = true;
|
|
48
|
-
}, 250);
|
|
49
|
-
} else {
|
|
50
|
-
drawer[QDocument.name][doc.name] = false;
|
|
51
|
-
}
|
|
51
|
+
drawer[QDocument.name][doc.name] = false;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
</script>
|
|
55
55
|
|
|
56
56
|
{#each QComponentDocs as QDocument, index}
|
|
57
|
-
<QCard class="q-px-none q-pb-none">
|
|
58
|
-
<div slot="title" class="flex between
|
|
57
|
+
<QCard class="q-px-none q-pb-none q-mt-lg">
|
|
58
|
+
<div slot="title" class="flex justify-between items-center q-px-md">
|
|
59
59
|
<h5 class="no-margin">
|
|
60
60
|
<QIcon name="info" />
|
|
61
61
|
<span class="q-ml-md">{QDocument.name} API</span>
|
|
@@ -64,7 +64,7 @@ function handleDrawer(QDocument, doc) {
|
|
|
64
64
|
{#each Object.entries(QDocument.docs) as [tabName, _tabDoc]}
|
|
65
65
|
{#if _tabDoc.length !== 0}
|
|
66
66
|
<QTab name={tabName} style="min-width: 100px">
|
|
67
|
-
<h6>{capitalize(tabName)}</h6>
|
|
67
|
+
<h6 style="margin: 0">{capitalize(tabName)}</h6>
|
|
68
68
|
</QTab>
|
|
69
69
|
{/if}
|
|
70
70
|
{/each}
|
|
@@ -77,7 +77,7 @@ function handleDrawer(QDocument, doc) {
|
|
|
77
77
|
{#if isProp(doc, index) && doc.clickableType}
|
|
78
78
|
<QDrawer
|
|
79
79
|
side="right"
|
|
80
|
-
class="no-padding"
|
|
80
|
+
class="no-padding api-drawer"
|
|
81
81
|
style="height: fit-content; max-height: 400%; overflow: auto; border-radius: 0;"
|
|
82
82
|
bind:value={drawer[QDocument.name][doc.name]}
|
|
83
83
|
width="50%"
|
|
@@ -87,7 +87,7 @@ function handleDrawer(QDocument, doc) {
|
|
|
87
87
|
{/if}
|
|
88
88
|
<QItemSection type="content" style="overflow: visible">
|
|
89
89
|
<div slot="headline" class="q-my-sm" style="flex: 1 1 0; white-space: nowrap">
|
|
90
|
-
<span class="
|
|
90
|
+
<span class="q-pa-sm surface-variant">
|
|
91
91
|
<b>{doc.name}</b>
|
|
92
92
|
{#if isProp(doc, index)}
|
|
93
93
|
{doc.optional ? "?" : ""}
|
|
@@ -95,7 +95,7 @@ function handleDrawer(QDocument, doc) {
|
|
|
95
95
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
96
96
|
<span
|
|
97
97
|
class="prop-type clickable"
|
|
98
|
-
on:click={() => isProp(doc, index) && handleDrawer(QDocument, doc)}
|
|
98
|
+
on:click={(e) => isProp(doc, index) && handleDrawer(QDocument, doc, e)}
|
|
99
99
|
>
|
|
100
100
|
: {doc.type}
|
|
101
101
|
</span>
|
|
@@ -112,7 +112,9 @@ function handleDrawer(QDocument, doc) {
|
|
|
112
112
|
{/if}
|
|
113
113
|
</span>
|
|
114
114
|
</div>
|
|
115
|
-
<div slot="line1" class="q-mt-sm prop-description"
|
|
115
|
+
<div slot="line1" class="q-mt-sm prop-description" style="white-space: normal;">
|
|
116
|
+
{@html doc.description}
|
|
117
|
+
</div>
|
|
116
118
|
</QItemSection>
|
|
117
119
|
</QItem>
|
|
118
120
|
{/each}
|
|
@@ -131,10 +133,11 @@ function handleDrawer(QDocument, doc) {
|
|
|
131
133
|
.q-item {
|
|
132
134
|
overflow: visible;
|
|
133
135
|
}
|
|
134
|
-
|
|
136
|
+
|
|
137
|
+
:global(.q-drawer.api-drawer pre) {
|
|
135
138
|
margin: 0;
|
|
136
|
-
padding: 1em;
|
|
137
139
|
border-radius: inherit;
|
|
140
|
+
white-space: pre-wrap;
|
|
138
141
|
}
|
|
139
142
|
|
|
140
143
|
:global(.prop-description > a:hover) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { QComponentDocs } from "../../utils/types";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
@@ -12,6 +12,6 @@ declare const __propDef: {
|
|
|
12
12
|
export type QApiProps = typeof __propDef.props;
|
|
13
13
|
export type QApiEvents = typeof __propDef.events;
|
|
14
14
|
export type QApiSlots = typeof __propDef.slots;
|
|
15
|
-
export default class QApi extends
|
|
15
|
+
export default class QApi extends SvelteComponent<QApiProps, QApiEvents, QApiSlots> {
|
|
16
16
|
}
|
|
17
17
|
export {};
|
|
@@ -7,28 +7,32 @@ $:
|
|
|
7
7
|
let principalDocument = Array.isArray(QComponentDocs) ? QComponentDocs[0] : QComponentDocs;
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
|
-
<div style="margin: 1rem">
|
|
11
|
-
<div class="
|
|
12
|
-
<QCard class="
|
|
10
|
+
<div class="q-docs" style="margin: 1rem">
|
|
11
|
+
<div class="row q-gutter-lg q-mb-lg" style="min-height: 400px">
|
|
12
|
+
<QCard class="col-sm-12 col-lg-6 flex flex-center" fill="primary" style="min-height: 400px">
|
|
13
13
|
<h1 class="large no-margin" slot="title">{principalDocument.name}</h1>
|
|
14
14
|
</QCard>
|
|
15
|
-
<QCard
|
|
16
|
-
|
|
15
|
+
<QCard
|
|
16
|
+
class="q-docs__preview col-sm-12 col-lg-6 q-mt-none q-pa-none"
|
|
17
|
+
fill="secondary"
|
|
18
|
+
style="min-height: 400px"
|
|
19
|
+
>
|
|
20
|
+
<QCardSection class="q-pa-none">
|
|
17
21
|
<div
|
|
18
|
-
class="flex center
|
|
22
|
+
class="flex flex-center"
|
|
19
23
|
style="position: absolute; height: 100%; width: 100%; z-index: 1;"
|
|
20
24
|
>
|
|
21
25
|
<slot name="display" />
|
|
22
26
|
</div>
|
|
23
27
|
<img
|
|
24
|
-
class="
|
|
28
|
+
class="q-docs__image"
|
|
25
29
|
src="/beer-splash-{isDark ? 'dark' : 'light'}.jpg"
|
|
26
30
|
alt="Close-up of the content of a glass of beer"
|
|
27
31
|
style={isDark ? "filter:brightness(0.3)" : ""}
|
|
28
32
|
/>
|
|
29
33
|
</QCardSection>
|
|
30
|
-
<QCardSection class="flex center
|
|
31
|
-
<h3 class="
|
|
34
|
+
<QCardSection class="q-docs__description flex flex-center">
|
|
35
|
+
<h3 class="q-docs__description-text">
|
|
32
36
|
{principalDocument.description}
|
|
33
37
|
</h3>
|
|
34
38
|
</QCardSection>
|
|
@@ -50,7 +54,31 @@ let principalDocument = Array.isArray(QComponentDocs) ? QComponentDocs[0] : QCom
|
|
|
50
54
|
<slot />
|
|
51
55
|
</div>
|
|
52
56
|
|
|
53
|
-
<style>.
|
|
57
|
+
<style>.q-docs :global(.q-pa-none) {
|
|
58
|
+
padding: 0 !important;
|
|
59
|
+
}
|
|
60
|
+
.q-docs__image {
|
|
61
|
+
width: 100%;
|
|
62
|
+
height: 12rem;
|
|
63
|
+
object-fit: cover;
|
|
64
|
+
border-bottom-left-radius: 0;
|
|
65
|
+
border-bottom-right-radius: 0;
|
|
66
|
+
}
|
|
67
|
+
.q-docs :global(.q-docs__preview) {
|
|
68
|
+
display: flex !important;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
}
|
|
71
|
+
.q-docs :global(.q-docs__description) {
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-grow: 1;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
align-items: center;
|
|
76
|
+
}
|
|
77
|
+
.q-docs :global(.q-docs__description-text) {
|
|
78
|
+
font-size: 1.75rem;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.prop-type {
|
|
54
82
|
opacity: 0.75;
|
|
55
83
|
}
|
|
56
84
|
.prop-type.clickable {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { QComponentDocs } from "
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { QComponentDocs } from "../../utils/types";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
QComponentDocs: QComponentDocs | QComponentDocs[];
|
|
@@ -16,6 +16,6 @@ declare const __propDef: {
|
|
|
16
16
|
export type QDocsProps = typeof __propDef.props;
|
|
17
17
|
export type QDocsEvents = typeof __propDef.events;
|
|
18
18
|
export type QDocsSlots = typeof __propDef.slots;
|
|
19
|
-
export default class QDocs extends
|
|
19
|
+
export default class QDocs extends SvelteComponent<QDocsProps, QDocsEvents, QDocsSlots> {
|
|
20
20
|
}
|
|
21
21
|
export {};
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<div style="margin-bottom:48px">
|
|
11
|
-
<div class="flex between
|
|
11
|
+
<div class="flex justify-between q-mb-md">
|
|
12
12
|
<h5>{title}</h5>
|
|
13
13
|
{#if snippets}
|
|
14
14
|
<QDialog
|
|
15
15
|
class="snippet-dialog"
|
|
16
16
|
bind:value={dialog}
|
|
17
|
-
btnAttrs={{ outline: true,
|
|
17
|
+
btnAttrs={{ outline: true, round: true, icon: "code" }}
|
|
18
18
|
on:btnClick={() => (dialog = true)}
|
|
19
19
|
modal
|
|
20
20
|
>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @typedef {typeof __propDef.props} QDocsSectionProps */
|
|
2
2
|
/** @typedef {typeof __propDef.events} QDocsSectionEvents */
|
|
3
3
|
/** @typedef {typeof __propDef.slots} QDocsSectionSlots */
|
|
4
|
-
export default class QDocsSection extends
|
|
4
|
+
export default class QDocsSection extends SvelteComponent<{
|
|
5
5
|
title: any;
|
|
6
6
|
snippets: any;
|
|
7
7
|
}, {
|
|
@@ -13,7 +13,7 @@ export default class QDocsSection extends SvelteComponentTyped<{
|
|
|
13
13
|
export type QDocsSectionProps = typeof __propDef.props;
|
|
14
14
|
export type QDocsSectionEvents = typeof __propDef.events;
|
|
15
15
|
export type QDocsSectionSlots = typeof __propDef.slots;
|
|
16
|
-
import {
|
|
16
|
+
import { SvelteComponent } from "svelte";
|
|
17
17
|
declare const __propDef: {
|
|
18
18
|
props: {
|
|
19
19
|
title: any;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
<script>import {
|
|
1
|
+
<script>import { useSize } from "../../composables/use-size";
|
|
2
|
+
import { createClasses } from "../../utils/props";
|
|
2
3
|
import { isNumber } from "../../utils/types";
|
|
3
4
|
export let value = 0, indeterminate = false, size = "2em", color = void 0, thickness = 5, userClasses = void 0;
|
|
4
5
|
export { userClasses as class };
|
|
5
6
|
$:
|
|
6
|
-
spinnerSize =
|
|
7
|
+
spinnerSize = useSize(size);
|
|
7
8
|
$:
|
|
8
9
|
classes = createClasses([indeterminate && "indeterminate"], {
|
|
9
10
|
component: "q-circular-progress",
|
|
@@ -12,7 +13,7 @@ $:
|
|
|
12
13
|
});
|
|
13
14
|
</script>
|
|
14
15
|
|
|
15
|
-
<svg class={classes} height={spinnerSize} width={spinnerSize} viewBox="25 25 50 50">
|
|
16
|
+
<svg class={classes} height={spinnerSize.style} width={spinnerSize.style} viewBox="25 25 50 50">
|
|
16
17
|
<circle
|
|
17
18
|
class="path"
|
|
18
19
|
cx="50"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { QCircularProgressProps } from "./props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
value?: number | undefined;
|
|
6
|
-
indeterminate?:
|
|
7
|
-
size?:
|
|
6
|
+
indeterminate?: QCircularProgressProps["indeterminate"];
|
|
7
|
+
size?: QCircularProgressProps["size"];
|
|
8
8
|
color?: QCircularProgressProps["color"];
|
|
9
|
-
thickness?:
|
|
9
|
+
thickness?: QCircularProgressProps["thickness"];
|
|
10
10
|
class?: string | undefined;
|
|
11
11
|
};
|
|
12
12
|
events: {
|
|
@@ -14,9 +14,9 @@ declare const __propDef: {
|
|
|
14
14
|
};
|
|
15
15
|
slots: {};
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type QCircularProgressProps_ = typeof __propDef.props;
|
|
18
|
+
export { QCircularProgressProps_ as QCircularProgressProps };
|
|
18
19
|
export type QCircularProgressEvents = typeof __propDef.events;
|
|
19
20
|
export type QCircularProgressSlots = typeof __propDef.slots;
|
|
20
|
-
export default class QCircularProgress extends
|
|
21
|
+
export default class QCircularProgress extends SvelteComponent<QCircularProgressProps, QCircularProgressEvents, QCircularProgressSlots> {
|
|
21
22
|
}
|
|
22
|
-
export {};
|
|
@@ -6,9 +6,15 @@ $:
|
|
|
6
6
|
borderRadius: rounded ? "12px" : "0"
|
|
7
7
|
};
|
|
8
8
|
$:
|
|
9
|
-
containerClasses = createClasses(["small-space", "border",
|
|
9
|
+
containerClasses = createClasses(["small-space", "border"], {
|
|
10
|
+
component: "q-linear-progress",
|
|
11
|
+
userClasses
|
|
12
|
+
});
|
|
10
13
|
$:
|
|
11
|
-
progressClasses = createClasses([
|
|
14
|
+
progressClasses = createClasses([from], {
|
|
15
|
+
component: "q-linear-progress",
|
|
16
|
+
element: "progress"
|
|
17
|
+
});
|
|
12
18
|
$:
|
|
13
19
|
containerStyle = createStyles(roundedStyle, userStyles);
|
|
14
20
|
$:
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { QLinearProgressProps } from "./props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
value?: number | undefined;
|
|
7
|
-
from?: "
|
|
8
|
-
rounded?:
|
|
7
|
+
from?: QLinearProgressProps["from"];
|
|
8
|
+
rounded?: QLinearProgressProps["rounded"];
|
|
9
9
|
class?: string | undefined;
|
|
10
10
|
style?: string | undefined;
|
|
11
11
|
};
|
|
@@ -14,9 +14,9 @@ declare const __propDef: {
|
|
|
14
14
|
};
|
|
15
15
|
slots: {};
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type QLinearProgressProps_ = typeof __propDef.props;
|
|
18
|
+
export { QLinearProgressProps_ as QLinearProgressProps };
|
|
18
19
|
export type QLinearProgressEvents = typeof __propDef.events;
|
|
19
20
|
export type QLinearProgressSlots = typeof __propDef.slots;
|
|
20
|
-
export default class QLinearProgress extends
|
|
21
|
+
export default class QLinearProgress extends SvelteComponent<QLinearProgressProps, QLinearProgressEvents, QLinearProgressSlots> {
|
|
21
22
|
}
|
|
22
|
-
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { QLinearProgressDocsProps } from "./docs.props";
|
|
2
|
+
export let QProgressDocs = {
|
|
3
|
+
name: "QProgress",
|
|
4
|
+
description: "The QProgress component is used to display a progress bar, indicating the completion status of a task or process.",
|
|
5
|
+
docs: {
|
|
6
|
+
props: QLinearProgressDocsProps,
|
|
7
|
+
slots: [],
|
|
8
|
+
methods: [],
|
|
9
|
+
events: [],
|
|
10
|
+
},
|
|
11
|
+
};
|
|
@@ -6,3 +6,11 @@ export declare const QLinearProgressDocsProps: {
|
|
|
6
6
|
description: string;
|
|
7
7
|
default: string;
|
|
8
8
|
}[];
|
|
9
|
+
export declare const QCircularProgressDocsProps: {
|
|
10
|
+
name: string;
|
|
11
|
+
type: string;
|
|
12
|
+
optional: boolean;
|
|
13
|
+
clickableType: boolean;
|
|
14
|
+
description: string;
|
|
15
|
+
default: string;
|
|
16
|
+
}[];
|
|
@@ -24,3 +24,45 @@ export const QLinearProgressDocsProps = [
|
|
|
24
24
|
default: "",
|
|
25
25
|
},
|
|
26
26
|
];
|
|
27
|
+
export const QCircularProgressDocsProps = [
|
|
28
|
+
{
|
|
29
|
+
name: "value",
|
|
30
|
+
type: "number",
|
|
31
|
+
optional: false,
|
|
32
|
+
clickableType: false,
|
|
33
|
+
description: "",
|
|
34
|
+
default: "",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "indeterminate",
|
|
38
|
+
type: "boolean",
|
|
39
|
+
optional: false,
|
|
40
|
+
clickableType: false,
|
|
41
|
+
description: "",
|
|
42
|
+
default: "",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "size",
|
|
46
|
+
type: "string | number",
|
|
47
|
+
optional: false,
|
|
48
|
+
clickableType: false,
|
|
49
|
+
description: "",
|
|
50
|
+
default: "",
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "color",
|
|
54
|
+
type: "string",
|
|
55
|
+
optional: true,
|
|
56
|
+
clickableType: false,
|
|
57
|
+
description: "",
|
|
58
|
+
default: "",
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "thickness",
|
|
62
|
+
type: "number",
|
|
63
|
+
optional: false,
|
|
64
|
+
clickableType: false,
|
|
65
|
+
description: "",
|
|
66
|
+
default: "",
|
|
67
|
+
},
|
|
68
|
+
];
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
// Linear progress
|
|
2
|
+
.q-linear-progress {
|
|
3
|
+
height: 1rem;
|
|
4
|
+
@include border;
|
|
5
|
+
|
|
6
|
+
&__progress {
|
|
7
|
+
position: absolute;
|
|
8
|
+
background-color: var(--active);
|
|
9
|
+
top: 0;
|
|
10
|
+
bottom: 0;
|
|
11
|
+
left: 0;
|
|
12
|
+
right: 0;
|
|
13
|
+
transition: var(--speed4) clip-path;
|
|
14
|
+
clip-path: polygon(0% 0%, 0% 0%, 0% 0%, 0% 0%);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
2
17
|
|
|
3
18
|
// Circular progress
|
|
4
19
|
.q-circular-progress {
|
|
@@ -1,20 +1,37 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { NativeProps, CssValue } from "../../utils/types";
|
|
2
2
|
export interface QLinearProgressProps extends NativeProps {
|
|
3
|
+
/**
|
|
4
|
+
* @default 0
|
|
5
|
+
*/
|
|
3
6
|
value: number;
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
/**
|
|
8
|
+
* @default left
|
|
9
|
+
*/
|
|
10
|
+
from?: "left" | "right";
|
|
11
|
+
/**
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
rounded?: boolean;
|
|
6
15
|
}
|
|
7
16
|
export interface QCircularProgressProps extends NativeProps {
|
|
17
|
+
/**
|
|
18
|
+
* @default 0
|
|
19
|
+
*/
|
|
8
20
|
value: number;
|
|
9
|
-
|
|
10
|
-
|
|
21
|
+
/**
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
indeterminate?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @default 2em
|
|
27
|
+
*/
|
|
28
|
+
size?: CssValue | number;
|
|
29
|
+
/**
|
|
30
|
+
* @default undefined
|
|
31
|
+
*/
|
|
11
32
|
color?: string;
|
|
12
|
-
|
|
33
|
+
/**
|
|
34
|
+
* @default 5
|
|
35
|
+
*/
|
|
36
|
+
thickness?: number;
|
|
13
37
|
}
|
|
14
|
-
export declare const QLinearProgressPropsDefaults: {
|
|
15
|
-
userClasses?: string | undefined;
|
|
16
|
-
userStyles?: string | undefined;
|
|
17
|
-
value: number;
|
|
18
|
-
from: string;
|
|
19
|
-
rounded: boolean;
|
|
20
|
-
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
2
|
import type { QRadioProps } from "./props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
value?: string | undefined;
|
|
7
|
-
label?:
|
|
7
|
+
label?: QRadioProps["label"];
|
|
8
8
|
selected?: QRadioProps["selected"];
|
|
9
|
-
disable?:
|
|
9
|
+
disable?: QRadioProps["disable"];
|
|
10
10
|
class?: string | undefined;
|
|
11
11
|
};
|
|
12
12
|
events: {
|
|
@@ -14,9 +14,9 @@ declare const __propDef: {
|
|
|
14
14
|
};
|
|
15
15
|
slots: {};
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type QRadioProps_ = typeof __propDef.props;
|
|
18
|
+
export { QRadioProps_ as QRadioProps };
|
|
18
19
|
export type QRadioEvents = typeof __propDef.events;
|
|
19
20
|
export type QRadioSlots = typeof __propDef.slots;
|
|
20
|
-
export default class QRadio extends
|
|
21
|
+
export default class QRadio extends SvelteComponent<QRadioProps, QRadioEvents, QRadioSlots> {
|
|
21
22
|
}
|
|
22
|
-
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "
|
|
1
|
+
import type { QComponentDocs } from "../../utils/types";
|
|
2
2
|
export declare let QRadioDocs: QComponentDocs;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { NativeProps } from "../../utils/types";
|
|
2
2
|
export interface QRadioProps extends NativeProps {
|
|
3
3
|
value: string;
|
|
4
|
-
label
|
|
5
|
-
selected
|
|
6
|
-
disable
|
|
4
|
+
label?: string;
|
|
5
|
+
selected?: any;
|
|
6
|
+
disable?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare const QRadioPropsDefaults: QRadioProps;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script>import { getContext } from "svelte";
|
|
2
2
|
import { createClasses, createStyles } from "../../utils/props";
|
|
3
|
-
import {
|
|
3
|
+
import { useSize } from "../../composables/use-size";
|
|
4
|
+
import { derived } from "svelte/store";
|
|
4
5
|
export let width = 88, side = "left", bordered = false, userClasses = void 0, userStyles = void 0;
|
|
5
6
|
export { userClasses as class, userStyles as style };
|
|
6
7
|
let ctx = getContext("layout");
|
|
@@ -8,20 +9,23 @@ let drawerType;
|
|
|
8
9
|
$:
|
|
9
10
|
drawerType = side === "left" ? "drawerLeft" : "drawerRight";
|
|
10
11
|
$:
|
|
11
|
-
classes = createClasses(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
classes = createClasses(
|
|
13
|
+
[
|
|
14
|
+
side,
|
|
15
|
+
bordered && "bordered",
|
|
16
|
+
$ctx && $ctx[drawerType].offset.top && "offset-top",
|
|
17
|
+
$ctx && $ctx[drawerType].offset.bottom && "offset-bottom",
|
|
18
|
+
$ctx && $ctx[drawerType].fixed && "fixed",
|
|
19
|
+
$borderRadiusClasses,
|
|
20
|
+
$zIndexClass
|
|
21
|
+
],
|
|
22
|
+
{
|
|
23
|
+
component: "q-railbar",
|
|
24
|
+
userClasses
|
|
25
|
+
}
|
|
26
|
+
);
|
|
23
27
|
$:
|
|
24
|
-
widthStyle = ctx
|
|
28
|
+
widthStyle = !$ctx && useSize(width).style;
|
|
25
29
|
$:
|
|
26
30
|
style = createStyles(
|
|
27
31
|
{
|
|
@@ -29,22 +33,37 @@ $:
|
|
|
29
33
|
},
|
|
30
34
|
userStyles
|
|
31
35
|
);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
$:
|
|
37
|
+
borderRadiusClasses = ctx && // No border radius if this isn't a layout railbar
|
|
38
|
+
derived(ctx, (context) => {
|
|
39
|
+
const borderSide = side === "left" ? "right" : "left";
|
|
40
|
+
const shouldHaveRadius = (pos) => {
|
|
41
|
+
let appBarEl = pos === "top" ? context["header"] : context["footer"];
|
|
42
|
+
if (context[drawerType].drawer) {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
return !appBarEl?.display || context[drawerType].offset[pos];
|
|
46
|
+
};
|
|
47
|
+
return createClasses(
|
|
48
|
+
[
|
|
49
|
+
shouldHaveRadius("top") && `top-${borderSide}-radius`,
|
|
50
|
+
shouldHaveRadius("bottom") && `bottom-${borderSide}-radius`
|
|
51
|
+
],
|
|
52
|
+
{
|
|
53
|
+
component: "q-railbar"
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
$:
|
|
58
|
+
zIndexClass = ctx && derived(ctx, (context) => {
|
|
59
|
+
let drawer = side === "left" ? context.drawerLeft : context.drawerRight;
|
|
60
|
+
let pos;
|
|
61
|
+
for (pos of ["top", "bottom"]) {
|
|
62
|
+
if (!drawer.offset[pos] && drawer.overlay) {
|
|
63
|
+
return "above";
|
|
64
|
+
}
|
|
45
65
|
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
66
|
+
});
|
|
48
67
|
</script>
|
|
49
68
|
|
|
50
69
|
<nav class={classes} {style}>
|