@quaffui/quaff 0.1.0-prealpha12 → 0.1.0-prealpha15
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 +37 -29
- package/dist/components/avatar/QAvatar.svelte.d.ts +0 -1
- package/dist/components/avatar/docs.d.ts +1 -1
- package/dist/components/avatar/docs.props.js +2 -0
- package/dist/components/avatar/props.d.ts +1 -1
- package/dist/components/breadcrumbs/QBreadcrumbs.svelte +3 -8
- package/dist/components/breadcrumbs/QBreadcrumbsEl.svelte +12 -20
- package/dist/components/breadcrumbs/docs.d.ts +1 -1
- package/dist/components/breadcrumbs/docs.props.js +2 -0
- package/dist/components/breadcrumbs/props.d.ts +1 -1
- package/dist/components/button/QBtn.svelte +23 -27
- package/dist/components/button/docs.d.ts +1 -1
- package/dist/components/button/docs.props.js +18 -0
- package/dist/components/button/props.d.ts +1 -1
- package/dist/components/card/QCard.svelte +8 -9
- package/dist/components/card/QCardActions.svelte +7 -11
- package/dist/components/card/QCardSection.svelte +7 -9
- package/dist/components/card/docs.d.ts +1 -1
- package/dist/components/card/docs.props.js +3 -1
- package/dist/components/card/props.d.ts +2 -2
- package/dist/components/checkbox/QCheckbox.svelte +6 -8
- package/dist/components/checkbox/docs.d.ts +1 -1
- package/dist/components/checkbox/docs.props.js +2 -0
- package/dist/components/checkbox/props.d.ts +1 -1
- package/dist/components/chip/QChip.svelte +39 -30
- package/dist/components/chip/QChip.svelte.d.ts +2 -1
- package/dist/components/chip/docs.d.ts +1 -1
- package/dist/components/chip/docs.props.js +10 -0
- package/dist/components/chip/index.scss +18 -1
- package/dist/components/chip/props.d.ts +6 -1
- package/dist/components/codeBlock/QCodeBlock.svelte +24 -22
- package/dist/components/codeBlock/QCodeBlock.svelte.d.ts +0 -1
- package/dist/components/codeBlock/docs.props.js +2 -0
- package/dist/components/dialog/QDialog.svelte +40 -49
- package/dist/components/dialog/QDialog.svelte.d.ts +6 -5
- package/dist/components/dialog/docs.d.ts +1 -1
- package/dist/components/dialog/docs.props.js +22 -4
- package/dist/components/dialog/index.scss +5 -4
- package/dist/components/dialog/props.d.ts +5 -5
- package/dist/components/drawer/QDrawer.svelte +3 -3
- package/dist/components/drawer/docs.d.ts +1 -1
- package/dist/components/drawer/docs.props.js +3 -1
- package/dist/components/drawer/props.d.ts +1 -1
- package/dist/components/footer/QFooter.svelte +3 -3
- package/dist/components/footer/docs.d.ts +1 -1
- package/dist/components/footer/docs.props.js +6 -4
- package/dist/components/footer/props.d.ts +1 -1
- package/dist/components/header/QHeader.svelte +2 -2
- package/dist/components/header/docs.props.d.ts +24 -0
- package/dist/components/header/docs.props.js +72 -0
- package/dist/components/icon/QIcon.svelte +10 -19
- package/dist/components/icon/QIcon.svelte.d.ts +0 -1
- package/dist/components/icon/docs.d.ts +1 -1
- package/dist/components/icon/docs.props.js +6 -4
- package/dist/components/icon/props.d.ts +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +2 -1
- package/dist/components/input/QInput.svelte +62 -73
- package/dist/components/input/QInput.svelte.d.ts +3 -2
- package/dist/components/input/docs.d.ts +1 -1
- package/dist/components/input/docs.js +1 -7
- package/dist/components/input/docs.props.js +7 -13
- package/dist/components/input/index.scss +1 -3
- package/dist/components/input/props.d.ts +1 -3
- package/dist/components/input/props.js +0 -1
- package/dist/components/layout/QLayout.svelte +6 -6
- package/dist/components/layout/QLayout.svelte.d.ts +2 -2
- package/dist/components/layout/docs.d.ts +1 -1
- package/dist/components/layout/docs.props.js +9 -7
- package/dist/components/layout/index.scss +2 -6
- package/dist/components/layout/props.d.ts +1 -1
- package/dist/components/list/QItem.svelte +29 -29
- package/dist/components/list/QItemSection.svelte +12 -15
- package/dist/components/list/QList.svelte +12 -13
- package/dist/components/list/docs.d.ts +1 -1
- package/dist/components/list/docs.props.js +45 -27
- package/dist/components/list/index.scss +1 -0
- package/dist/components/list/props.d.ts +1 -1
- package/dist/components/list/props.js +1 -1
- package/dist/components/private/QApi.svelte +2 -2
- package/dist/components/private/QApi.svelte.d.ts +1 -1
- package/dist/components/private/QDocs.svelte +2 -2
- package/dist/components/private/QDocs.svelte.d.ts +1 -1
- package/dist/components/private/QDocsSection.svelte +2 -3
- package/dist/components/progress/QCircularProgress.svelte +14 -11
- package/dist/components/progress/QLinearProgress.svelte +17 -23
- package/dist/components/progress/QLinearProgress.svelte.d.ts +0 -1
- package/dist/components/progress/docs.d.ts +1 -1
- package/dist/components/progress/docs.props.js +17 -15
- package/dist/components/progress/index.scss +20 -3
- package/dist/components/progress/props.d.ts +1 -1
- package/dist/components/radio/QRadio.svelte +2 -8
- package/dist/components/radio/docs.d.ts +1 -1
- package/dist/components/radio/docs.props.js +5 -3
- package/dist/components/radio/props.d.ts +1 -1
- package/dist/components/radio/props.js +1 -1
- package/dist/components/railbar/QRailbar.svelte +3 -3
- package/dist/components/railbar/docs.d.ts +1 -1
- package/dist/components/railbar/docs.props.js +9 -7
- package/dist/components/railbar/props.d.ts +1 -1
- package/dist/components/select/QSelect.svelte +87 -93
- package/dist/components/select/QSelect.svelte.d.ts +2 -1
- package/dist/components/select/docs.d.ts +1 -1
- package/dist/components/select/docs.js +1 -7
- package/dist/components/select/docs.props.js +6 -12
- package/dist/components/select/index.scss +17 -4
- package/dist/components/select/props.d.ts +1 -3
- package/dist/components/select/props.js +0 -1
- package/dist/components/separator/QSeparator.svelte +39 -50
- package/dist/components/separator/QSeparator.svelte.d.ts +0 -1
- package/dist/components/separator/docs.d.ts +1 -1
- package/dist/components/separator/docs.props.js +15 -13
- package/dist/components/separator/index.scss +52 -0
- package/dist/components/separator/props.d.ts +3 -3
- package/dist/components/table/QTable.svelte +8 -17
- package/dist/components/table/QTable.svelte.d.ts +1 -2
- package/dist/components/table/docs.d.ts +1 -1
- package/dist/components/table/docs.props.js +3 -1
- package/dist/components/table/props.d.ts +1 -1
- package/dist/components/tabs/QTab.svelte +50 -43
- package/dist/components/tabs/QTab.svelte.d.ts +1 -1
- package/dist/components/tabs/QTabs.svelte +61 -42
- package/dist/components/tabs/QTabs.svelte.d.ts +11 -1
- package/dist/components/tabs/docs.d.ts +1 -1
- package/dist/components/tabs/docs.props.js +5 -3
- package/dist/components/tabs/index.scss +30 -21
- package/dist/components/tabs/props.d.ts +2 -4
- package/dist/components/tabs/props.js +1 -13
- package/dist/components/toggle/QToggle.svelte +7 -16
- package/dist/components/toggle/docs.d.ts +1 -1
- package/dist/components/toggle/docs.props.js +2 -0
- package/dist/components/toggle/props.d.ts +1 -1
- package/dist/components/toggle/props.js +1 -1
- package/dist/components/toolbar/QToolbar.svelte +12 -16
- package/dist/components/toolbar/QToolbar.svelte.d.ts +0 -1
- package/dist/components/toolbar/QToolbarTitle.svelte +1 -1
- package/dist/components/toolbar/docs.d.ts +1 -1
- package/dist/components/toolbar/docs.props.js +26 -8
- package/dist/components/toolbar/props.d.ts +1 -1
- package/dist/components/tooltip/QTooltip.svelte +10 -8
- package/dist/components/tooltip/docs.d.ts +1 -1
- package/dist/components/tooltip/docs.props.js +3 -1
- package/dist/components/tooltip/index.scss +1 -0
- package/dist/components/tooltip/props.d.ts +1 -1
- package/dist/components/tooltip/props.js +1 -1
- package/dist/composables/index.d.ts +3 -0
- package/dist/composables/index.js +3 -1
- package/dist/composables/use-align.d.ts +1 -1
- package/dist/composables/use-align.js +1 -1
- package/dist/composables/use-router-link.d.ts +1 -1
- package/dist/composables/use-router-link.js +2 -2
- package/dist/composables/use-size.d.ts +1 -1
- package/dist/composables/use-size.js +2 -2
- package/dist/css/index.css +1 -1
- package/dist/css/index.scss +1 -0
- package/dist/css/mixins/field-mixins.scss +53 -0
- package/dist/css/mixins.scss +5 -4
- package/dist/css/ripple.scss +8 -1
- package/dist/css/shared/q-field.scss +318 -0
- package/dist/css/theme/colors.module.scss +261 -109
- package/dist/css/theme/palette.scss +8 -2
- package/dist/helpers/index.d.ts +1 -1
- package/dist/helpers/index.js +1 -1
- package/dist/helpers/ripple.js +12 -10
- package/dist/helpers/version.d.ts +1 -1
- package/dist/helpers/version.js +1 -1
- package/dist/stores/QTheme.d.ts +8 -7
- package/dist/stores/QTheme.js +3 -3
- package/dist/stores/Quaff.js +1 -1
- package/dist/stores/index.d.ts +2 -0
- package/dist/stores/index.js +2 -0
- package/dist/utils/clipboard.d.ts +1 -1
- package/dist/utils/clipboard.js +1 -2
- package/dist/utils/dom.d.ts +1 -0
- package/dist/utils/dom.js +4 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +8 -1
- package/dist/utils/props.d.ts +1 -1
- package/dist/utils/types.d.ts +1 -1
- package/dist/utils/types.json +24 -1
- package/package.json +23 -24
- package/dist/composables/use-index.d.ts +0 -2
- package/dist/composables/use-index.js +0 -17
- package/dist/css/mixins/field.scss +0 -432
- package/dist/helpers/activationHandler.d.ts +0 -9
- package/dist/helpers/activationHandler.js +0 -23
- package/dist/utils/fields.d.ts +0 -1
- package/dist/utils/fields.js +0 -14
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
|
|
3
|
-
export let bordered = false, roundedBorders = false, dense = false, separator = false, separatorOptions = {}, padding = false, tag = "div", userClasses = void 0;
|
|
1
|
+
<script>import { onMount, setContext } from "svelte";
|
|
2
|
+
export let bordered = false, roundedBorders = false, dense = false, separator = false, separatorOptions = {}, padding = false, tag = "div", userClasses = "";
|
|
4
3
|
export { userClasses as class };
|
|
5
4
|
let listElement;
|
|
6
5
|
onMount(() => listElement.querySelector(".q-separator__wrapper:first-child")?.remove());
|
|
7
6
|
$:
|
|
8
7
|
setContext("separator", separator === true ? separatorOptions : void 0);
|
|
9
|
-
$:
|
|
10
|
-
classes = createClasses(
|
|
11
|
-
[bordered && "bordered", dense && "dense", roundedBorders && "rounded"],
|
|
12
|
-
{
|
|
13
|
-
component: "q-list",
|
|
14
|
-
quaffClasses: [padding && "q-py-sm"],
|
|
15
|
-
userClasses
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
8
|
</script>
|
|
19
9
|
|
|
20
|
-
<svelte:element
|
|
10
|
+
<svelte:element
|
|
11
|
+
this={tag}
|
|
12
|
+
class="q-list {userClasses}"
|
|
13
|
+
class:q-list--bordered={bordered}
|
|
14
|
+
class:q-list--rounded={roundedBorders}
|
|
15
|
+
class:q-list--dense={dense}
|
|
16
|
+
class:q-py-sm={padding}
|
|
17
|
+
{...$$restProps}
|
|
18
|
+
bind:this={listElement}
|
|
19
|
+
on:scroll>
|
|
21
20
|
<slot />
|
|
22
21
|
</svelte:element>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "../../utils
|
|
1
|
+
import type { QComponentDocs } from "../../utils";
|
|
2
2
|
export declare let QListDocs: QComponentDocs;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
// AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
|
|
2
|
+
// @quaffHash 19dd7fe617657229e8599e139a0a55a7
|
|
1
3
|
export const QSeparatorPropsVertical = [
|
|
2
4
|
{
|
|
3
5
|
name: "spacing",
|
|
4
|
-
type:
|
|
5
|
-
optional:
|
|
6
|
-
clickableType:
|
|
6
|
+
type: "QuaffSizes",
|
|
7
|
+
optional: true,
|
|
8
|
+
clickableType: true,
|
|
7
9
|
description: "",
|
|
8
10
|
default: "",
|
|
9
11
|
},
|
|
10
12
|
{
|
|
11
13
|
name: "inset",
|
|
12
14
|
type: "boolean",
|
|
13
|
-
optional:
|
|
15
|
+
optional: true,
|
|
14
16
|
clickableType: false,
|
|
15
17
|
description: "",
|
|
16
18
|
default: "",
|
|
@@ -18,7 +20,7 @@ export const QSeparatorPropsVertical = [
|
|
|
18
20
|
{
|
|
19
21
|
name: "vertical",
|
|
20
22
|
type: "true",
|
|
21
|
-
optional:
|
|
23
|
+
optional: true,
|
|
22
24
|
clickableType: false,
|
|
23
25
|
description: "",
|
|
24
26
|
default: "",
|
|
@@ -50,7 +52,7 @@ export const QSeparatorPropsVertical = [
|
|
|
50
52
|
{
|
|
51
53
|
name: "textAlign",
|
|
52
54
|
type: '"top" | "middle" | "bottom"',
|
|
53
|
-
optional:
|
|
55
|
+
optional: true,
|
|
54
56
|
clickableType: false,
|
|
55
57
|
description: "",
|
|
56
58
|
default: "",
|
|
@@ -59,16 +61,16 @@ export const QSeparatorPropsVertical = [
|
|
|
59
61
|
export const QSeparatorPropsHorizontal = [
|
|
60
62
|
{
|
|
61
63
|
name: "spacing",
|
|
62
|
-
type:
|
|
63
|
-
optional:
|
|
64
|
-
clickableType:
|
|
64
|
+
type: "QuaffSizes",
|
|
65
|
+
optional: true,
|
|
66
|
+
clickableType: true,
|
|
65
67
|
description: "",
|
|
66
68
|
default: "",
|
|
67
69
|
},
|
|
68
70
|
{
|
|
69
71
|
name: "inset",
|
|
70
72
|
type: "boolean",
|
|
71
|
-
optional:
|
|
73
|
+
optional: true,
|
|
72
74
|
clickableType: false,
|
|
73
75
|
description: "",
|
|
74
76
|
default: "",
|
|
@@ -76,7 +78,7 @@ export const QSeparatorPropsHorizontal = [
|
|
|
76
78
|
{
|
|
77
79
|
name: "vertical",
|
|
78
80
|
type: "false",
|
|
79
|
-
optional:
|
|
81
|
+
optional: true,
|
|
80
82
|
clickableType: false,
|
|
81
83
|
description: "",
|
|
82
84
|
default: "",
|
|
@@ -92,7 +94,7 @@ export const QSeparatorPropsHorizontal = [
|
|
|
92
94
|
{
|
|
93
95
|
name: "size",
|
|
94
96
|
type: "string",
|
|
95
|
-
optional:
|
|
97
|
+
optional: true,
|
|
96
98
|
clickableType: false,
|
|
97
99
|
description: "",
|
|
98
100
|
default: "",
|
|
@@ -108,7 +110,7 @@ export const QSeparatorPropsHorizontal = [
|
|
|
108
110
|
{
|
|
109
111
|
name: "textAlign",
|
|
110
112
|
type: '"left" | "center" | "right"',
|
|
111
|
-
optional:
|
|
113
|
+
optional: true,
|
|
112
114
|
clickableType: false,
|
|
113
115
|
description: "",
|
|
114
116
|
default: "",
|
|
@@ -118,7 +120,7 @@ export const QListDocsProps = [
|
|
|
118
120
|
{
|
|
119
121
|
name: "bordered",
|
|
120
122
|
type: "boolean",
|
|
121
|
-
optional:
|
|
123
|
+
optional: true,
|
|
122
124
|
clickableType: false,
|
|
123
125
|
description: "",
|
|
124
126
|
default: "",
|
|
@@ -126,7 +128,7 @@ export const QListDocsProps = [
|
|
|
126
128
|
{
|
|
127
129
|
name: "roundedBorders",
|
|
128
130
|
type: "boolean",
|
|
129
|
-
optional:
|
|
131
|
+
optional: true,
|
|
130
132
|
clickableType: false,
|
|
131
133
|
description: "",
|
|
132
134
|
default: "",
|
|
@@ -134,7 +136,7 @@ export const QListDocsProps = [
|
|
|
134
136
|
{
|
|
135
137
|
name: "dense",
|
|
136
138
|
type: "boolean",
|
|
137
|
-
optional:
|
|
139
|
+
optional: true,
|
|
138
140
|
clickableType: false,
|
|
139
141
|
description: "",
|
|
140
142
|
default: "",
|
|
@@ -142,7 +144,7 @@ export const QListDocsProps = [
|
|
|
142
144
|
{
|
|
143
145
|
name: "separator",
|
|
144
146
|
type: "boolean",
|
|
145
|
-
optional:
|
|
147
|
+
optional: true,
|
|
146
148
|
clickableType: false,
|
|
147
149
|
description: "",
|
|
148
150
|
default: "",
|
|
@@ -150,7 +152,7 @@ export const QListDocsProps = [
|
|
|
150
152
|
{
|
|
151
153
|
name: "separatorOptions",
|
|
152
154
|
type: 'QSeparatorProps["textAlign"]\n };',
|
|
153
|
-
optional:
|
|
155
|
+
optional: true,
|
|
154
156
|
clickableType: true,
|
|
155
157
|
description: "",
|
|
156
158
|
default: "",
|
|
@@ -158,7 +160,7 @@ export const QListDocsProps = [
|
|
|
158
160
|
{
|
|
159
161
|
name: "padding",
|
|
160
162
|
type: "boolean",
|
|
161
|
-
optional:
|
|
163
|
+
optional: true,
|
|
162
164
|
clickableType: false,
|
|
163
165
|
description: "",
|
|
164
166
|
default: "",
|
|
@@ -176,7 +178,7 @@ export const QItemDocsProps = [
|
|
|
176
178
|
{
|
|
177
179
|
name: "tag",
|
|
178
180
|
type: "string",
|
|
179
|
-
optional:
|
|
181
|
+
optional: true,
|
|
180
182
|
clickableType: false,
|
|
181
183
|
description: "",
|
|
182
184
|
default: "",
|
|
@@ -184,7 +186,7 @@ export const QItemDocsProps = [
|
|
|
184
186
|
{
|
|
185
187
|
name: "active",
|
|
186
188
|
type: "boolean",
|
|
187
|
-
optional:
|
|
189
|
+
optional: true,
|
|
188
190
|
clickableType: false,
|
|
189
191
|
description: "",
|
|
190
192
|
default: "",
|
|
@@ -192,7 +194,7 @@ export const QItemDocsProps = [
|
|
|
192
194
|
{
|
|
193
195
|
name: "clickable",
|
|
194
196
|
type: "boolean",
|
|
195
|
-
optional:
|
|
197
|
+
optional: true,
|
|
196
198
|
clickableType: false,
|
|
197
199
|
description: "",
|
|
198
200
|
default: "",
|
|
@@ -200,25 +202,41 @@ export const QItemDocsProps = [
|
|
|
200
202
|
{
|
|
201
203
|
name: "dense",
|
|
202
204
|
type: "boolean",
|
|
203
|
-
optional:
|
|
205
|
+
optional: true,
|
|
204
206
|
clickableType: false,
|
|
205
207
|
description: "",
|
|
206
208
|
default: "",
|
|
207
209
|
},
|
|
208
210
|
{
|
|
209
|
-
name: "
|
|
210
|
-
type: "
|
|
211
|
-
optional:
|
|
211
|
+
name: "noRipple",
|
|
212
|
+
type: "boolean",
|
|
213
|
+
optional: true,
|
|
212
214
|
clickableType: false,
|
|
213
215
|
description: "",
|
|
214
216
|
default: "",
|
|
215
217
|
},
|
|
218
|
+
{
|
|
219
|
+
name: "tabindex",
|
|
220
|
+
type: 'HTMLAttributes<HTMLElement>["tabindex"]',
|
|
221
|
+
optional: true,
|
|
222
|
+
clickableType: true,
|
|
223
|
+
description: "",
|
|
224
|
+
default: "",
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
name: "target",
|
|
228
|
+
type: 'HTMLAnchorAttributes["target"]',
|
|
229
|
+
optional: true,
|
|
230
|
+
clickableType: true,
|
|
231
|
+
description: "",
|
|
232
|
+
default: "",
|
|
233
|
+
},
|
|
216
234
|
];
|
|
217
235
|
export const QItemSectionDocsProps = [
|
|
218
236
|
{
|
|
219
237
|
name: "type",
|
|
220
238
|
type: "QItemSectionTypes",
|
|
221
|
-
optional:
|
|
239
|
+
optional: true,
|
|
222
240
|
clickableType: true,
|
|
223
241
|
description: "",
|
|
224
242
|
default: "",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type NativeProps } from "../../utils/types";
|
|
2
1
|
import type { UseRouterLinkProps } from "../../composables/use-router-link";
|
|
3
2
|
import type { QSeparatorProps } from "../separator/props";
|
|
4
3
|
import type { HTMLAnchorAttributes, HTMLAttributes } from "svelte/elements";
|
|
4
|
+
import type { NativeProps } from "../../utils";
|
|
5
5
|
export interface QListProps extends NativeProps, HTMLAttributes<HTMLElement> {
|
|
6
6
|
bordered?: boolean;
|
|
7
7
|
roundedBorders?: boolean;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import {
|
|
1
|
+
<script>import {
|
|
3
2
|
QCard,
|
|
4
3
|
QIcon,
|
|
5
4
|
QTabs,
|
|
@@ -11,6 +10,7 @@ import {
|
|
|
11
10
|
QDrawer,
|
|
12
11
|
QCodeBlock
|
|
13
12
|
} from "../..";
|
|
13
|
+
import { capitalize } from "../../utils";
|
|
14
14
|
import Types from "../../utils/types.json";
|
|
15
15
|
export let QComponentDocs;
|
|
16
16
|
let api = QComponentDocs.map((_doc) => "props");
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
import { QDialog } from "../..";
|
|
3
|
-
import QCodeBlock from "../codeBlock/QCodeBlock.svelte";
|
|
2
|
+
import { QCodeBlock, QDialog } from "../..";
|
|
4
3
|
|
|
5
4
|
export let title, snippets;
|
|
6
5
|
|
|
@@ -15,7 +14,7 @@
|
|
|
15
14
|
class="snippet-dialog"
|
|
16
15
|
bind:value={dialog}
|
|
17
16
|
btnAttrs={{ outline: true, round: true, icon: "code" }}
|
|
18
|
-
on:
|
|
17
|
+
on:buttonClick={() => (dialog = true)}
|
|
19
18
|
modal
|
|
20
19
|
>
|
|
21
20
|
<QCodeBlock code={snippets[title]} language="svelte" {title} copiable />
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
<script>import { useSize } from "../../composables
|
|
2
|
-
|
|
3
|
-
import { isNumber } from "../../utils/types";
|
|
4
|
-
export let value = 0, indeterminate = false, size = "2em", color = void 0, thickness = 5, userClasses = void 0;
|
|
1
|
+
<script>import { useSize } from "../../composables";
|
|
2
|
+
export let value = 0, indeterminate = false, size = "2rem", color = void 0, thickness = 5, userClasses = void 0;
|
|
5
3
|
export { userClasses as class };
|
|
6
4
|
$:
|
|
7
5
|
spinnerSize = useSize(size);
|
|
6
|
+
const circumference = 2 * Math.PI * 20;
|
|
8
7
|
$:
|
|
9
|
-
|
|
10
|
-
component: "q-circular-progress",
|
|
11
|
-
quaffClasses: [color && `${color}-text`],
|
|
12
|
-
userClasses
|
|
13
|
-
});
|
|
8
|
+
progressOffset = (100 - value) / 100 * circumference;
|
|
14
9
|
</script>
|
|
15
10
|
|
|
16
11
|
<svg
|
|
17
|
-
class={
|
|
12
|
+
class="q-circular-progress {color ? `text-${color}` : ''} {userClasses}"
|
|
13
|
+
class:q-circular-progress--indeterminate={indeterminate}
|
|
18
14
|
height={spinnerSize.style}
|
|
19
15
|
width={spinnerSize.style}
|
|
20
16
|
viewBox="25 25 50 50"
|
|
17
|
+
style="transform: rotate3d(0, 0, 1, -90deg);"
|
|
18
|
+
role="progressbar"
|
|
19
|
+
aria-valuenow={value}
|
|
20
|
+
aria-valuemin={0}
|
|
21
|
+
aria-valuemax={100}
|
|
21
22
|
{...$$restProps}
|
|
22
23
|
>
|
|
23
24
|
<circle
|
|
24
|
-
class="
|
|
25
|
+
class="q-circular-progress__path"
|
|
25
26
|
cx="50"
|
|
26
27
|
cy="50"
|
|
27
28
|
r="20"
|
|
@@ -29,5 +30,7 @@ $:
|
|
|
29
30
|
stroke="currentColor"
|
|
30
31
|
stroke-width={thickness}
|
|
31
32
|
stroke-miterlimit="10"
|
|
33
|
+
stroke-dasharray={circumference}
|
|
34
|
+
stroke-dashoffset={progressOffset}
|
|
32
35
|
/>
|
|
33
36
|
</svg>
|
|
@@ -1,26 +1,20 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export
|
|
3
|
-
export { userClasses as class, userStyles as style };
|
|
4
|
-
$:
|
|
5
|
-
roundedStyle = {
|
|
6
|
-
borderRadius: rounded ? "12px" : "0"
|
|
7
|
-
};
|
|
8
|
-
$:
|
|
9
|
-
containerClasses = createClasses(["small-space", "border"], {
|
|
10
|
-
component: "q-linear-progress",
|
|
11
|
-
userClasses
|
|
12
|
-
});
|
|
13
|
-
$:
|
|
14
|
-
progressClasses = createClasses([from], {
|
|
15
|
-
component: "q-linear-progress",
|
|
16
|
-
element: "progress"
|
|
17
|
-
});
|
|
18
|
-
$:
|
|
19
|
-
containerStyle = createStyles(roundedStyle, userStyles);
|
|
20
|
-
$:
|
|
21
|
-
progressStyle = from === "right" ? `clip-path: polygon(100% 0%, 100% 100%, ${100 - value}% 100%, ${100 - value}% 0%);` : `clip-path: polygon(0% 0%, 0% 100%, ${value}% 100%, ${value}% 0%);`;
|
|
1
|
+
<script>export let value = 0, from = "left", rounded = false, userClasses = "";
|
|
2
|
+
export { userClasses as class };
|
|
22
3
|
</script>
|
|
23
4
|
|
|
24
|
-
<div
|
|
25
|
-
|
|
5
|
+
<div
|
|
6
|
+
class="q-linear-progress {userClasses}"
|
|
7
|
+
class:q-linear-progress--rounded={rounded}
|
|
8
|
+
class:q-linear-progress--right={from === "right"}
|
|
9
|
+
role="progressbar"
|
|
10
|
+
aria-valuenow={value}
|
|
11
|
+
aria-valuemin={0}
|
|
12
|
+
aria-valuemax={100}
|
|
13
|
+
{...$$restProps}
|
|
14
|
+
>
|
|
15
|
+
<div
|
|
16
|
+
class="q-linear-progress__progress"
|
|
17
|
+
class:q-linear-progress__progress--right={from === "right"}
|
|
18
|
+
style="--progress:{value}%"
|
|
19
|
+
/>
|
|
26
20
|
</div>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "../../utils
|
|
1
|
+
import type { QComponentDocs } from "../../utils";
|
|
2
2
|
export declare let QProgressDocs: QComponentDocs;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
|
|
2
|
+
// @quaffHash 2d797d26b761264825c885770bbaeaf7
|
|
1
3
|
export const QLinearProgressDocsProps = [
|
|
2
4
|
{
|
|
3
5
|
name: "value",
|
|
@@ -5,23 +7,23 @@ export const QLinearProgressDocsProps = [
|
|
|
5
7
|
optional: false,
|
|
6
8
|
clickableType: false,
|
|
7
9
|
description: "",
|
|
8
|
-
default: "",
|
|
10
|
+
default: "0",
|
|
9
11
|
},
|
|
10
12
|
{
|
|
11
13
|
name: "from",
|
|
12
14
|
type: '"left" | "right"',
|
|
13
|
-
optional:
|
|
15
|
+
optional: true,
|
|
14
16
|
clickableType: false,
|
|
15
17
|
description: "",
|
|
16
|
-
default: "",
|
|
18
|
+
default: "left",
|
|
17
19
|
},
|
|
18
20
|
{
|
|
19
21
|
name: "rounded",
|
|
20
22
|
type: "boolean",
|
|
21
|
-
optional:
|
|
23
|
+
optional: true,
|
|
22
24
|
clickableType: false,
|
|
23
25
|
description: "",
|
|
24
|
-
default: "",
|
|
26
|
+
default: "false",
|
|
25
27
|
},
|
|
26
28
|
];
|
|
27
29
|
export const QCircularProgressDocsProps = [
|
|
@@ -31,23 +33,23 @@ export const QCircularProgressDocsProps = [
|
|
|
31
33
|
optional: false,
|
|
32
34
|
clickableType: false,
|
|
33
35
|
description: "",
|
|
34
|
-
default: "",
|
|
36
|
+
default: "0",
|
|
35
37
|
},
|
|
36
38
|
{
|
|
37
39
|
name: "indeterminate",
|
|
38
40
|
type: "boolean",
|
|
39
|
-
optional:
|
|
41
|
+
optional: true,
|
|
40
42
|
clickableType: false,
|
|
41
43
|
description: "",
|
|
42
|
-
default: "",
|
|
44
|
+
default: "false",
|
|
43
45
|
},
|
|
44
46
|
{
|
|
45
47
|
name: "size",
|
|
46
|
-
type: "
|
|
47
|
-
optional:
|
|
48
|
-
clickableType:
|
|
48
|
+
type: "CssValue | number",
|
|
49
|
+
optional: true,
|
|
50
|
+
clickableType: true,
|
|
49
51
|
description: "",
|
|
50
|
-
default: "",
|
|
52
|
+
default: "2em",
|
|
51
53
|
},
|
|
52
54
|
{
|
|
53
55
|
name: "color",
|
|
@@ -55,14 +57,14 @@ export const QCircularProgressDocsProps = [
|
|
|
55
57
|
optional: true,
|
|
56
58
|
clickableType: false,
|
|
57
59
|
description: "",
|
|
58
|
-
default: "",
|
|
60
|
+
default: "undefined",
|
|
59
61
|
},
|
|
60
62
|
{
|
|
61
63
|
name: "thickness",
|
|
62
64
|
type: "number",
|
|
63
|
-
optional:
|
|
65
|
+
optional: true,
|
|
64
66
|
clickableType: false,
|
|
65
67
|
description: "",
|
|
66
|
-
default: "",
|
|
68
|
+
default: "5",
|
|
67
69
|
},
|
|
68
70
|
];
|
|
@@ -3,15 +3,28 @@
|
|
|
3
3
|
height: 1rem;
|
|
4
4
|
@include border;
|
|
5
5
|
|
|
6
|
+
&--rounded {
|
|
7
|
+
border-radius: 0.75rem;
|
|
8
|
+
}
|
|
9
|
+
|
|
6
10
|
&__progress {
|
|
7
11
|
position: absolute;
|
|
8
|
-
background-color: var(--
|
|
12
|
+
background-color: var(--primary);
|
|
9
13
|
top: 0;
|
|
10
14
|
bottom: 0;
|
|
11
15
|
left: 0;
|
|
12
16
|
right: 0;
|
|
13
17
|
transition: var(--speed4) clip-path;
|
|
14
|
-
clip-path: polygon(0% 0%, 0%
|
|
18
|
+
clip-path: polygon(0% 0%, 0% 100%, var(--progress) 100%, var(--progress) 0%);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&--right &__progress {
|
|
22
|
+
clip-path: polygon(
|
|
23
|
+
100% 0%,
|
|
24
|
+
100% 100%,
|
|
25
|
+
calc(100% - var(--progress)) 100%,
|
|
26
|
+
calc(100% - var(--progress)) 0%
|
|
27
|
+
);
|
|
15
28
|
}
|
|
16
29
|
}
|
|
17
30
|
|
|
@@ -19,11 +32,15 @@
|
|
|
19
32
|
.q-circular-progress {
|
|
20
33
|
vertical-align: middle;
|
|
21
34
|
|
|
35
|
+
.q-circular-progress__path {
|
|
36
|
+
transition: stroke-dashoffset 0.3s ease;
|
|
37
|
+
}
|
|
38
|
+
|
|
22
39
|
&--indeterminate {
|
|
23
40
|
animation: q-spin 2s linear infinite;
|
|
24
41
|
transform-origin: center center;
|
|
25
42
|
|
|
26
|
-
|
|
43
|
+
.q-circular-progress__path {
|
|
27
44
|
stroke-dasharray: 1, 200;
|
|
28
45
|
stroke-dashoffset: 0;
|
|
29
46
|
animation: q-load 1.5s ease-in-out infinite;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NativeProps, CssValue } from "../../utils
|
|
1
|
+
import type { NativeProps, CssValue } from "../../utils";
|
|
2
2
|
import type { HTMLAttributes, SVGAttributes } from "svelte/elements";
|
|
3
3
|
export interface QLinearProgressProps extends NativeProps, HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
/**
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export let value = "", label = "", selected = void 0, disable = false, userClasses = "";
|
|
1
|
+
<script>export let value = "", label = "", selected = void 0, disable = false, userClasses = "";
|
|
3
2
|
export { userClasses as class };
|
|
4
|
-
$:
|
|
5
|
-
classes = createClasses([disable && "disabled"], {
|
|
6
|
-
component: "q-radio",
|
|
7
|
-
userClasses
|
|
8
|
-
});
|
|
9
3
|
</script>
|
|
10
4
|
|
|
11
|
-
<label class={
|
|
5
|
+
<label class="q-radio {userClasses}" class:q-radio--disabled={disable} {...$$restProps}>
|
|
12
6
|
<input type="radio" bind:group={selected} {value} disabled={disable} />
|
|
13
7
|
<span>{label}</span>
|
|
14
8
|
</label>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "../../utils
|
|
1
|
+
import type { QComponentDocs } from "../../utils";
|
|
2
2
|
export declare let QRadioDocs: QComponentDocs;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
|
|
2
|
+
// @quaffHash 69b1c5ef18592fae8026d06e26d19bfc
|
|
1
3
|
export const QRadioDocsProps = [
|
|
2
4
|
{
|
|
3
5
|
name: "value",
|
|
@@ -10,7 +12,7 @@ export const QRadioDocsProps = [
|
|
|
10
12
|
{
|
|
11
13
|
name: "label",
|
|
12
14
|
type: "string",
|
|
13
|
-
optional:
|
|
15
|
+
optional: true,
|
|
14
16
|
clickableType: false,
|
|
15
17
|
description: "",
|
|
16
18
|
default: "",
|
|
@@ -18,7 +20,7 @@ export const QRadioDocsProps = [
|
|
|
18
20
|
{
|
|
19
21
|
name: "selected",
|
|
20
22
|
type: "any",
|
|
21
|
-
optional:
|
|
23
|
+
optional: true,
|
|
22
24
|
clickableType: false,
|
|
23
25
|
description: "",
|
|
24
26
|
default: "",
|
|
@@ -26,7 +28,7 @@ export const QRadioDocsProps = [
|
|
|
26
28
|
{
|
|
27
29
|
name: "disable",
|
|
28
30
|
type: "boolean",
|
|
29
|
-
optional:
|
|
31
|
+
optional: true,
|
|
30
32
|
clickableType: false,
|
|
31
33
|
description: "",
|
|
32
34
|
default: "",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { NativeProps } from "../../utils/types";
|
|
2
1
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
+
import type { NativeProps } from "../../utils";
|
|
3
3
|
export interface QRadioProps extends NativeProps, HTMLAttributes<HTMLLabelElement> {
|
|
4
4
|
value: string;
|
|
5
5
|
label?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import { createClasses, createStyles } from "../../utils
|
|
3
|
-
import {
|
|
1
|
+
<script>import { useSize } from "../../composables";
|
|
2
|
+
import { createClasses, createStyles } from "../../utils";
|
|
3
|
+
import { getContext } from "svelte";
|
|
4
4
|
import { derived } from "svelte/store";
|
|
5
5
|
export let width = 88, side = "left", bordered = false, userClasses = void 0, userStyles = void 0;
|
|
6
6
|
export { userClasses as class, userStyles as style };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "../../utils
|
|
1
|
+
import type { QComponentDocs } from "../../utils";
|
|
2
2
|
export declare let QRailbarDocs: QComponentDocs;
|