@quaffui/quaff 0.1.0-prealpha2 → 0.1.0-prealpha20
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 +6 -6
- package/dist/classes/QContext.svelte.d.ts +42 -0
- package/dist/classes/QContext.svelte.js +63 -0
- package/dist/classes/QScrollObserver.svelte.d.ts +44 -0
- package/dist/classes/QScrollObserver.svelte.js +95 -0
- package/dist/classes/QTheme.svelte.d.ts +11 -0
- package/dist/classes/QTheme.svelte.js +49 -0
- package/dist/classes/Quaff.svelte.d.ts +14 -0
- package/dist/classes/Quaff.svelte.js +35 -0
- package/dist/components/avatar/QAvatar.scss +97 -0
- package/dist/components/avatar/QAvatar.svelte +35 -41
- package/dist/components/avatar/QAvatar.svelte.d.ts +2 -26
- package/dist/components/avatar/docs.d.ts +2 -2
- package/dist/components/avatar/docs.js +1 -1
- package/dist/components/avatar/docs.props.js +22 -4
- package/dist/components/avatar/index.scss +6 -1
- package/dist/components/avatar/props.d.ts +25 -7
- package/dist/components/avatar/props.js +1 -1
- package/dist/components/breadcrumbs/QBreadcrumbs.scss +10 -0
- package/dist/components/breadcrumbs/QBreadcrumbs.svelte +23 -14
- package/dist/components/breadcrumbs/QBreadcrumbs.svelte.d.ts +2 -22
- package/dist/components/breadcrumbs/QBreadcrumbsEl.scss +10 -0
- package/dist/components/breadcrumbs/QBreadcrumbsEl.svelte +64 -48
- package/dist/components/breadcrumbs/QBreadcrumbsEl.svelte.d.ts +2 -25
- package/dist/components/breadcrumbs/docs.d.ts +2 -2
- package/dist/components/breadcrumbs/docs.js +1 -1
- package/dist/components/breadcrumbs/docs.props.js +28 -26
- package/dist/components/breadcrumbs/props.d.ts +26 -24
- package/dist/components/button/QBtn.scss +133 -0
- package/dist/components/button/QBtn.svelte +94 -41
- package/dist/components/button/QBtn.svelte.d.ts +2 -31
- package/dist/components/button/docs.d.ts +2 -2
- package/dist/components/button/docs.js +1 -1
- package/dist/components/button/docs.props.js +47 -13
- package/dist/components/button/props.d.ts +35 -13
- package/dist/components/card/QCard.scss +25 -0
- package/dist/components/card/QCard.svelte +27 -19
- package/dist/components/card/QCard.svelte.d.ts +2 -25
- package/dist/components/card/QCardActions.scss +10 -0
- package/dist/components/card/QCardActions.svelte +14 -15
- package/dist/components/card/QCardActions.svelte.d.ts +2 -21
- package/dist/components/card/QCardSection.scss +10 -0
- package/dist/components/card/QCardSection.svelte +11 -11
- package/dist/components/card/QCardSection.svelte.d.ts +2 -22
- package/dist/components/card/docs.d.ts +4 -4
- package/dist/components/card/docs.js +3 -3
- package/dist/components/card/docs.props.js +9 -15
- package/dist/components/card/props.d.ts +11 -16
- package/dist/components/checkbox/QCheckbox.svelte +8 -9
- package/dist/components/checkbox/QCheckbox.svelte.d.ts +2 -20
- package/dist/components/checkbox/docs.d.ts +2 -2
- package/dist/components/checkbox/docs.js +1 -1
- package/dist/components/checkbox/docs.props.js +2 -0
- package/dist/components/checkbox/index.scss +7 -1
- package/dist/components/checkbox/props.d.ts +2 -2
- package/dist/components/chip/QChip.scss +179 -0
- package/dist/components/chip/QChip.svelte +98 -55
- package/dist/components/chip/QChip.svelte.d.ts +2 -34
- package/dist/components/chip/docs.d.ts +2 -2
- package/dist/components/chip/docs.js +1 -1
- package/dist/components/chip/docs.props.js +28 -42
- package/dist/components/chip/props.d.ts +25 -32
- package/dist/components/codeBlock/QCodeBlock.svelte +64 -45
- package/dist/components/codeBlock/QCodeBlock.svelte.d.ts +2 -22
- package/dist/components/codeBlock/docs.props.js +11 -1
- package/dist/components/codeBlock/props.d.ts +8 -2
- package/dist/components/dialog/QDialog.scss +177 -0
- package/dist/components/dialog/QDialog.svelte +77 -70
- package/dist/components/dialog/QDialog.svelte.d.ts +6 -36
- package/dist/components/dialog/docs.d.ts +2 -2
- package/dist/components/dialog/docs.js +1 -1
- package/dist/components/dialog/docs.props.d.ts +0 -8
- package/dist/components/dialog/docs.props.js +4 -108
- package/dist/components/dialog/props.d.ts +3 -18
- package/dist/components/drawer/QDrawer.scss +45 -0
- package/dist/components/drawer/QDrawer.svelte +91 -81
- package/dist/components/drawer/QDrawer.svelte.d.ts +6 -38
- package/dist/components/drawer/docs.d.ts +2 -2
- package/dist/components/drawer/docs.js +1 -1
- package/dist/components/drawer/docs.props.js +4 -2
- package/dist/components/drawer/props.d.ts +4 -3
- package/dist/components/footer/QFooter.scss +42 -0
- package/dist/components/footer/QFooter.svelte +67 -12
- package/dist/components/footer/QFooter.svelte.d.ts +2 -23
- package/dist/components/footer/docs.d.ts +2 -2
- package/dist/components/footer/docs.js +1 -1
- package/dist/components/footer/docs.props.js +13 -3
- package/dist/components/footer/props.d.ts +9 -5
- package/dist/components/header/QHeader.scss +54 -0
- package/dist/components/header/QHeader.svelte +56 -0
- package/dist/components/header/QHeader.svelte.d.ts +3 -0
- package/dist/components/header/docs.props.d.ts +24 -0
- package/dist/components/header/docs.props.js +88 -0
- package/dist/components/header/props.d.ts +23 -0
- package/dist/components/header/props.js +1 -0
- package/dist/components/icon/QIcon.scss +73 -0
- package/dist/components/icon/QIcon.svelte +32 -30
- package/dist/components/icon/QIcon.svelte.d.ts +2 -27
- package/dist/components/icon/docs.d.ts +2 -2
- package/dist/components/icon/docs.js +1 -1
- package/dist/components/icon/docs.props.js +11 -9
- package/dist/components/icon/props.d.ts +9 -8
- package/dist/components/index.d.ts +5 -2
- package/dist/components/index.js +5 -2
- package/dist/components/input/QInput.svelte +88 -72
- package/dist/components/input/QInput.svelte.d.ts +3 -32
- package/dist/components/input/docs.d.ts +2 -2
- package/dist/components/input/docs.js +2 -8
- package/dist/components/input/docs.props.js +39 -13
- package/dist/components/input/index.scss +1 -3
- package/dist/components/input/props.d.ts +13 -21
- package/dist/components/input/props.js +1 -13
- package/dist/components/layout/QLayout.scss +178 -0
- package/dist/components/layout/QLayout.svelte +101 -81
- package/dist/components/layout/QLayout.svelte.d.ts +17 -43
- package/dist/components/layout/docs.d.ts +2 -2
- package/dist/components/layout/docs.js +1 -1
- package/dist/components/layout/docs.props.js +65 -7
- package/dist/components/layout/props.d.ts +18 -9
- package/dist/components/list/QItem.scss +61 -0
- package/dist/components/list/QItem.svelte +73 -51
- package/dist/components/list/QItem.svelte.d.ts +2 -33
- package/dist/components/list/QItemSection.scss +45 -0
- package/dist/components/list/QItemSection.svelte +50 -37
- package/dist/components/list/QItemSection.svelte.d.ts +2 -24
- package/dist/components/list/QList.scss +30 -0
- package/dist/components/list/QList.svelte +30 -20
- package/dist/components/list/QList.svelte.d.ts +2 -35
- package/dist/components/list/docs.d.ts +2 -0
- package/dist/components/list/docs.js +11 -0
- package/dist/components/list/docs.props.js +79 -29
- package/dist/components/list/props.d.ts +24 -20
- package/dist/components/list/props.js +1 -25
- package/dist/components/private/ContextReseter.svelte +6 -11
- package/dist/components/private/ContextReseter.svelte.d.ts +6 -18
- package/dist/components/private/QApi.svelte +117 -93
- package/dist/components/private/QApi.svelte.d.ts +5 -17
- package/dist/components/private/QDocs.svelte +78 -41
- package/dist/components/private/QDocs.svelte.d.ts +10 -21
- package/dist/components/private/QDocsSection.svelte +16 -24
- package/dist/components/private/QDocsSection.svelte.d.ts +7 -29
- package/dist/components/private/QIconSnippet.svelte +12 -0
- package/dist/components/private/QIconSnippet.svelte.d.ts +8 -0
- package/dist/components/progress/QCircularProgress.scss +63 -0
- package/dist/components/progress/QCircularProgress.svelte +106 -20
- package/dist/components/progress/QCircularProgress.svelte.d.ts +2 -21
- package/dist/components/progress/QLinearProgress.scss +75 -0
- package/dist/components/progress/QLinearProgress.svelte +59 -17
- package/dist/components/progress/QLinearProgress.svelte.d.ts +2 -21
- 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 +181 -9
- package/dist/components/progress/props.d.ts +98 -17
- package/dist/components/progress/props.js +1 -7
- package/dist/components/radio/QRadio.svelte +14 -9
- package/dist/components/radio/QRadio.svelte.d.ts +2 -21
- package/dist/components/radio/docs.d.ts +2 -2
- package/dist/components/radio/docs.js +1 -1
- package/dist/components/radio/docs.props.js +6 -4
- package/dist/components/radio/index.scss +3 -1
- package/dist/components/radio/props.d.ts +5 -6
- package/dist/components/radio/props.js +1 -8
- package/dist/components/railbar/QRailbar.scss +54 -0
- package/dist/components/railbar/QRailbar.svelte +45 -49
- package/dist/components/railbar/QRailbar.svelte.d.ts +2 -22
- package/dist/components/railbar/docs.d.ts +2 -0
- package/dist/components/railbar/docs.js +11 -0
- package/dist/components/railbar/docs.props.js +10 -8
- package/dist/components/railbar/props.d.ts +15 -6
- package/dist/components/railbar/props.js +1 -7
- package/dist/components/select/QSelect.svelte +171 -140
- package/dist/components/select/QSelect.svelte.d.ts +2 -33
- package/dist/components/select/docs.d.ts +2 -2
- package/dist/components/select/docs.js +9 -8
- package/dist/components/select/docs.props.js +47 -13
- package/dist/components/select/index.scss +28 -7
- package/dist/components/select/props.d.ts +16 -20
- package/dist/components/select/props.js +1 -14
- package/dist/components/separator/QSeparator.scss +54 -0
- package/dist/components/separator/QSeparator.svelte +39 -57
- package/dist/components/separator/QSeparator.svelte.d.ts +2 -24
- package/dist/components/separator/docs.d.ts +2 -0
- package/dist/components/separator/docs.js +11 -0
- package/dist/components/separator/docs.props.js +16 -14
- package/dist/components/separator/props.d.ts +13 -14
- package/dist/components/separator/props.js +1 -9
- package/dist/components/switch/QSwitch.scss +305 -0
- package/dist/components/switch/QSwitch.svelte +96 -0
- package/dist/components/switch/QSwitch.svelte.d.ts +3 -0
- package/dist/components/switch/docs.d.ts +2 -0
- package/dist/components/{toggle → switch}/docs.js +3 -3
- package/dist/components/{toggle → switch}/docs.props.d.ts +1 -1
- package/dist/components/switch/docs.props.js +68 -0
- package/dist/components/switch/props.d.ts +13 -0
- package/dist/components/switch/props.js +1 -0
- package/dist/components/table/QTable.svelte +99 -94
- package/dist/components/table/QTable.svelte.d.ts +2 -28
- package/dist/components/table/docs.d.ts +2 -2
- package/dist/components/table/docs.js +1 -1
- package/dist/components/table/docs.props.js +11 -1
- package/dist/components/table/index.scss +3 -1
- package/dist/components/table/props.d.ts +14 -3
- package/dist/components/tabs/QTab.scss +71 -0
- package/dist/components/tabs/QTab.svelte +80 -66
- package/dist/components/tabs/QTab.svelte.d.ts +2 -27
- package/dist/components/tabs/QTabs.scss +40 -0
- package/dist/components/tabs/QTabs.svelte +114 -51
- package/dist/components/tabs/QTabs.svelte.d.ts +7 -22
- package/dist/components/tabs/docs.d.ts +2 -0
- package/dist/components/tabs/docs.js +11 -0
- package/dist/components/tabs/docs.props.js +10 -16
- package/dist/components/tabs/index.scss +71 -28
- package/dist/components/tabs/props.d.ts +9 -9
- package/dist/components/tabs/props.js +1 -13
- package/dist/components/toolbar/QToolbar.svelte +20 -37
- package/dist/components/toolbar/QToolbar.svelte.d.ts +2 -22
- package/dist/components/toolbar/QToolbarTitle.svelte +11 -0
- package/dist/components/toolbar/QToolbarTitle.svelte.d.ts +3 -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 +33 -5
- package/dist/components/toolbar/index.scss +34 -1
- package/dist/components/toolbar/props.d.ts +24 -5
- package/dist/components/toolbar/props.js +1 -6
- package/dist/components/tooltip/QTooltip.svelte +8 -12
- package/dist/components/tooltip/QTooltip.svelte.d.ts +2 -21
- package/dist/components/tooltip/docs.d.ts +2 -0
- package/dist/components/tooltip/docs.js +11 -0
- package/dist/components/tooltip/docs.props.js +3 -1
- package/dist/components/tooltip/index.scss +80 -2
- package/dist/components/tooltip/props.d.ts +4 -3
- 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 → useAlign.d.ts} +1 -1
- package/dist/composables/useAlign.js +23 -0
- package/dist/composables/{use-router-link.d.ts → useRouterLink.d.ts} +3 -3
- package/dist/composables/{use-router-link.js → useRouterLink.js} +4 -5
- package/dist/composables/useSize.d.ts +10 -0
- package/dist/composables/useSize.js +37 -0
- package/dist/composables/useSizeLegacy.d.ts +9 -0
- package/dist/composables/useSizeLegacy.js +25 -0
- package/dist/css/_components.scss +31 -0
- package/dist/css/_disabled.scss +18 -0
- package/dist/css/_ripple.scss +49 -0
- package/dist/css/_variables.scss +73 -0
- package/dist/css/classes/_design.scss +57 -0
- package/dist/css/classes/_flex.scss +62 -0
- package/dist/css/classes/_grid.scss +35 -0
- package/dist/css/classes/_index.scss +7 -0
- package/dist/css/classes/_overflow.scss +7 -0
- package/dist/css/classes/_position.scss +7 -0
- package/dist/css/classes/_select.scss +6 -0
- package/dist/css/classes/_spaces.scss +23 -0
- package/dist/css/flex.scss +41 -0
- package/dist/css/fonts.scss +17 -0
- package/dist/css/index.css +1 -0
- package/dist/css/index.scss +15 -111
- package/dist/css/mixins/_design.scss +63 -0
- package/dist/css/mixins/_field.scss +64 -0
- package/dist/css/mixins/_image.scss +63 -0
- package/dist/css/mixins/_index.scss +9 -0
- package/dist/css/mixins/_layout.scss +20 -0
- package/dist/css/mixins/{menu.scss → _menu.scss} +6 -2
- package/dist/css/mixins/{selection.scss → _selection.scss} +7 -67
- package/dist/css/mixins/_spaces.scss +36 -0
- package/dist/css/mixins/_typography.scss +7 -0
- package/dist/css/shared/q-field.scss +348 -0
- package/dist/css/theme/_colors.scss +173 -0
- package/dist/css/theme/colors.module.scss +261 -109
- package/dist/css/theme/css-variables.scss +5 -0
- package/dist/css/theme/elevate.scss +57 -0
- package/dist/css/theme/page.scss +16 -0
- package/dist/css/theme/palette.scss +653 -0
- package/dist/css/theme/reset.scss +56 -0
- package/dist/css/theme/theme.scss +7 -2
- package/dist/css/theme/tokens.scss +0 -159
- package/dist/css/theme/typography.scss +111 -0
- package/dist/global.d.ts +1 -2
- package/dist/helpers/clickOutside.d.ts +2 -2
- package/dist/helpers/clickOutside.js +5 -4
- package/dist/helpers/index.d.ts +1 -1
- package/dist/helpers/index.js +1 -1
- package/dist/helpers/ripple.d.ts +11 -0
- package/dist/helpers/ripple.js +90 -0
- package/dist/helpers/version.d.ts +2 -0
- package/dist/helpers/version.js +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/stores/index.d.ts +0 -0
- package/dist/stores/index.js +1 -0
- package/dist/utils/clipboard.d.ts +1 -1
- package/dist/utils/clipboard.js +3 -4
- package/dist/utils/colors.d.ts +71 -0
- package/dist/utils/colors.js +103 -15
- package/dist/utils/dom.d.ts +11 -0
- package/dist/utils/dom.js +81 -0
- package/dist/utils/events.d.ts +13 -0
- package/dist/utils/events.js +13 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +8 -1
- package/dist/utils/number.d.ts +2 -0
- package/dist/utils/number.js +9 -0
- package/dist/utils/props.d.ts +4 -4
- package/dist/utils/props.js +9 -7
- package/dist/utils/router.d.ts +17 -0
- package/dist/utils/router.js +23 -0
- package/dist/utils/string.d.ts +1 -0
- package/dist/utils/string.js +4 -1
- package/dist/utils/types.d.ts +12 -4
- package/dist/utils/types.js +0 -3
- package/dist/utils/types.json +27 -1
- package/dist/utils/watchable.d.ts +0 -1
- package/dist/utils/watchable.js +1 -1
- package/package.json +45 -37
- package/dist/components/breadcrumbs/index.scss +0 -20
- package/dist/components/button/index.scss +0 -78
- package/dist/components/card/index.scss +0 -53
- package/dist/components/chip/index.scss +0 -83
- package/dist/components/dialog/index.scss +0 -27
- package/dist/components/drawer/index.scss +0 -54
- package/dist/components/footer/index.scss +0 -5
- package/dist/components/icon/index.scss +0 -18
- package/dist/components/layout/index.scss +0 -370
- package/dist/components/list/index.scss +0 -114
- package/dist/components/progress/index.scss +0 -50
- package/dist/components/toggle/QToggle.svelte +0 -35
- package/dist/components/toggle/QToggle.svelte.d.ts +0 -23
- package/dist/components/toggle/docs.d.ts +0 -2
- package/dist/components/toggle/docs.props.js +0 -42
- package/dist/components/toggle/index.scss +0 -31
- package/dist/components/toggle/props.d.ts +0 -9
- package/dist/components/toggle/props.js +0 -9
- package/dist/composables/use-align.js +0 -12
- package/dist/composables/use-index.d.ts +0 -2
- package/dist/composables/use-index.js +0 -17
- package/dist/composables/use-size.d.ts +0 -11
- package/dist/composables/use-size.js +0 -13
- package/dist/css/grid.scss +0 -65
- package/dist/css/mixins/field.scss +0 -430
- package/dist/css/mixins.scss +0 -135
- package/dist/css/states.scss +0 -70
- package/dist/css/theme/theme.dark.scss +0 -36
- package/dist/css/theme/theme.light.scss +0 -36
- package/dist/helpers/activationHandler.d.ts +0 -9
- package/dist/helpers/activationHandler.js +0 -23
- package/dist/stores/QTheme.d.ts +0 -42
- package/dist/stores/QTheme.js +0 -53
- package/dist/stores/Quaff.d.ts +0 -32
- package/dist/stores/Quaff.js +0 -52
- package/dist/utils/fields.d.ts +0 -1
- package/dist/utils/fields.js +0 -14
- /package/dist/css/mixins/{table.scss → _table.scss} +0 -0
|
@@ -1,66 +1,103 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
isDark = $Quaff.
|
|
7
|
-
let principalDocument = Array.isArray(
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { QCard, QCardSection } from "../..";
|
|
3
|
+
import Quaff from "../../classes/Quaff.svelte";
|
|
4
|
+
import QApi from "./QApi.svelte";
|
|
5
|
+
let { children, display, pre, usage, componentDocs } = $props();
|
|
6
|
+
const isDark = $derived(Quaff.darkMode.isActive);
|
|
7
|
+
let principalDocument = Array.isArray(componentDocs)
|
|
8
|
+
? componentDocs[0]
|
|
9
|
+
: componentDocs;
|
|
8
10
|
</script>
|
|
9
11
|
|
|
10
|
-
<div style="margin: 1rem">
|
|
11
|
-
<div class="
|
|
12
|
-
<QCard
|
|
13
|
-
|
|
12
|
+
<div class="q-docs" style="margin: 1rem">
|
|
13
|
+
<div class="row q-gutter-lg" style="min-height: 400px">
|
|
14
|
+
<QCard
|
|
15
|
+
class="col-sm-12 col-lg-6 flex flex-center"
|
|
16
|
+
fill="primary"
|
|
17
|
+
style="min-height: 400px"
|
|
18
|
+
>
|
|
19
|
+
<h1 class="large no-margin">{principalDocument.name}</h1>
|
|
14
20
|
</QCard>
|
|
15
|
-
<QCard
|
|
16
|
-
|
|
21
|
+
<QCard
|
|
22
|
+
class="q-docs__preview col-sm-12 col-lg-6 q-mt-none q-pa-none"
|
|
23
|
+
fill="secondary"
|
|
24
|
+
style="min-height: 400px"
|
|
25
|
+
>
|
|
26
|
+
<QCardSection class="q-pa-none">
|
|
17
27
|
<div
|
|
18
|
-
class="flex center
|
|
28
|
+
class="flex flex-center"
|
|
19
29
|
style="position: absolute; height: 100%; width: 100%; z-index: 1;"
|
|
20
30
|
>
|
|
21
|
-
|
|
31
|
+
{@render display?.()}
|
|
22
32
|
</div>
|
|
23
33
|
<img
|
|
24
|
-
class="
|
|
34
|
+
class="q-docs__image"
|
|
25
35
|
src="/beer-splash-{isDark ? 'dark' : 'light'}.jpg"
|
|
26
36
|
alt="Close-up of the content of a glass of beer"
|
|
27
37
|
style={isDark ? "filter:brightness(0.3)" : ""}
|
|
28
38
|
/>
|
|
29
39
|
</QCardSection>
|
|
30
|
-
<QCardSection class="flex center
|
|
31
|
-
<h3 class="
|
|
40
|
+
<QCardSection class="q-docs__description flex flex-center">
|
|
41
|
+
<h3 class="q-docs__description-text">
|
|
32
42
|
{principalDocument.description}
|
|
33
43
|
</h3>
|
|
34
44
|
</QCardSection>
|
|
35
45
|
</QCard>
|
|
36
46
|
</div>
|
|
37
47
|
|
|
38
|
-
<
|
|
48
|
+
<div class="q-page">
|
|
49
|
+
<QApi
|
|
50
|
+
componentDocs={Array.isArray(componentDocs)
|
|
51
|
+
? componentDocs
|
|
52
|
+
: [componentDocs]}
|
|
53
|
+
/>
|
|
39
54
|
|
|
40
|
-
|
|
41
|
-
<div class="s12 q-pa-md">
|
|
42
|
-
<div class="heading-usage">
|
|
43
|
-
<h4 class="q-my-xl">Usage</h4>
|
|
44
|
-
</div>
|
|
55
|
+
{@render pre?.()}
|
|
45
56
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
57
|
+
{#if usage}
|
|
58
|
+
<div class="q-pa-md">
|
|
59
|
+
<div class="heading-usage">
|
|
60
|
+
<h4 class="q-my-xl">Usage</h4>
|
|
61
|
+
</div>
|
|
49
62
|
|
|
50
|
-
|
|
63
|
+
{@render usage()}
|
|
64
|
+
</div>
|
|
65
|
+
{/if}
|
|
66
|
+
|
|
67
|
+
{@render children?.()}
|
|
68
|
+
</div>
|
|
51
69
|
</div>
|
|
52
70
|
|
|
53
|
-
<style
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
71
|
+
<style>
|
|
72
|
+
.q-docs :global(.q-pa-none) {
|
|
73
|
+
padding: 0 !important;
|
|
74
|
+
}
|
|
75
|
+
.q-docs__image {
|
|
76
|
+
width: 100%;
|
|
77
|
+
height: 12rem;
|
|
78
|
+
object-fit: cover;
|
|
79
|
+
border-bottom-left-radius: 0;
|
|
80
|
+
border-bottom-right-radius: 0;
|
|
81
|
+
}
|
|
82
|
+
.q-docs :global(.q-docs__preview) {
|
|
83
|
+
display: flex !important;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
}
|
|
86
|
+
.q-docs :global(.q-docs__description) {
|
|
87
|
+
display: flex;
|
|
88
|
+
flex-grow: 1;
|
|
89
|
+
justify-content: center;
|
|
90
|
+
align-items: center;
|
|
91
|
+
}
|
|
92
|
+
.q-docs :global(.q-docs__description-text) {
|
|
93
|
+
font-size: 1.75rem;
|
|
94
|
+
}
|
|
95
|
+
.q-docs .q-page {
|
|
96
|
+
padding-top: 0.5rem;
|
|
97
|
+
}
|
|
62
98
|
|
|
63
|
-
.heading-usage {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
99
|
+
.heading-usage {
|
|
100
|
+
display: flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
}
|
|
103
|
+
</style>
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
display: {};
|
|
12
|
-
usage: {};
|
|
13
|
-
default: {};
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export type QDocsProps = typeof __propDef.props;
|
|
17
|
-
export type QDocsEvents = typeof __propDef.events;
|
|
18
|
-
export type QDocsSlots = typeof __propDef.slots;
|
|
19
|
-
export default class QDocs extends SvelteComponent<QDocsProps, QDocsEvents, QDocsSlots> {
|
|
20
|
-
}
|
|
21
|
-
export {};
|
|
1
|
+
import type { QComponentDocs } from "../../utils";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
declare const QDocs: import("svelte").Component<{
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
display?: Snippet;
|
|
6
|
+
pre?: Snippet;
|
|
7
|
+
usage?: Snippet;
|
|
8
|
+
componentDocs: QComponentDocs | QComponentDocs[];
|
|
9
|
+
}, {}, "">;
|
|
10
|
+
export default QDocs;
|
|
@@ -1,32 +1,24 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { QDialog } from "../..";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
let dialog = false;
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { QCodeBlock, QDialog, QBtn } from "../..";
|
|
3
|
+
let { title, snippet, children } = $props();
|
|
4
|
+
let dialog = $state(false);
|
|
5
|
+
const code = $derived(snippet?.replaceAll(/^ {2}/gm, ""));
|
|
8
6
|
</script>
|
|
9
7
|
|
|
10
8
|
<div style="margin-bottom:48px">
|
|
11
|
-
<div class="flex between
|
|
9
|
+
<div class="flex justify-between q-mb-md">
|
|
12
10
|
<h5>{title}</h5>
|
|
13
|
-
{#if
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
>
|
|
21
|
-
<QCodeBlock code
|
|
11
|
+
{#if code}
|
|
12
|
+
<QBtn
|
|
13
|
+
icon="code"
|
|
14
|
+
design="outlined"
|
|
15
|
+
round
|
|
16
|
+
onclick={() => (dialog = true)}
|
|
17
|
+
/>
|
|
18
|
+
<QDialog class="snippet-dialog" bind:value={dialog} modal>
|
|
19
|
+
<QCodeBlock {code} language="svelte" {title} copiable />
|
|
22
20
|
</QDialog>
|
|
23
21
|
{/if}
|
|
24
22
|
</div>
|
|
25
|
-
|
|
23
|
+
{@render children?.()}
|
|
26
24
|
</div>
|
|
27
|
-
|
|
28
|
-
<style>
|
|
29
|
-
pre {
|
|
30
|
-
max-height: 400px;
|
|
31
|
-
}
|
|
32
|
-
</style>
|
|
@@ -1,29 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
[evt: string]: CustomEvent<any>;
|
|
9
|
-
}, {
|
|
10
|
-
default: {};
|
|
11
|
-
}> {
|
|
12
|
-
}
|
|
13
|
-
export type QDocsSectionProps = typeof __propDef.props;
|
|
14
|
-
export type QDocsSectionEvents = typeof __propDef.events;
|
|
15
|
-
export type QDocsSectionSlots = typeof __propDef.slots;
|
|
16
|
-
import { SvelteComponent } from "svelte";
|
|
17
|
-
declare const __propDef: {
|
|
18
|
-
props: {
|
|
19
|
-
title: any;
|
|
20
|
-
snippets: any;
|
|
21
|
-
};
|
|
22
|
-
events: {
|
|
23
|
-
[evt: string]: CustomEvent<any>;
|
|
24
|
-
};
|
|
25
|
-
slots: {
|
|
26
|
-
default: {};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export {};
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
declare const QDocsSection: import("svelte").Component<{
|
|
3
|
+
title: string;
|
|
4
|
+
snippet?: string;
|
|
5
|
+
children?: Snippet;
|
|
6
|
+
}, {}, "">;
|
|
7
|
+
export default QDocsSection;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!-- This component should be used when an icon can be set from props. The icon can either be undefined, a string or a Snippet so this componnet handles it all. -->
|
|
2
|
+
<script lang="ts">
|
|
3
|
+
import QIcon from "../icon/QIcon.svelte";
|
|
4
|
+
let { icon, defaultIcon, ...props } = $props();
|
|
5
|
+
const iconToUse = $derived(icon ?? defaultIcon);
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
{#if typeof iconToUse === "string"}
|
|
9
|
+
<QIcon name={iconToUse} {...props} />
|
|
10
|
+
{:else}
|
|
11
|
+
{@render iconToUse?.()}
|
|
12
|
+
{/if}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { QIconProps } from "../icon/props";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { MaterialSymbol } from "material-symbols";
|
|
4
|
+
declare const QIconSnippet: import("svelte").Component<Omit<QIconProps, "name"> & {
|
|
5
|
+
icon?: MaterialSymbol | Snippet;
|
|
6
|
+
defaultIcon?: MaterialSymbol | Snippet;
|
|
7
|
+
}, {}, "">;
|
|
8
|
+
export default QIconSnippet;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
@use "$css/mixins";
|
|
2
|
+
|
|
3
|
+
.q-circular-progress {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
position: relative;
|
|
6
|
+
vertical-align: middle;
|
|
7
|
+
|
|
8
|
+
height: 1em;
|
|
9
|
+
width: 1em;
|
|
10
|
+
font-size: var(--size);
|
|
11
|
+
line-height: 0;
|
|
12
|
+
|
|
13
|
+
&__svg {
|
|
14
|
+
height: 100%;
|
|
15
|
+
width: 100%;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&--indeterminate {
|
|
19
|
+
& .q-circular-progress__svg {
|
|
20
|
+
transform-origin: 50% 50%;
|
|
21
|
+
animation: q-spin 2s linear infinite;
|
|
22
|
+
|
|
23
|
+
& .q-circular-progress__indicator {
|
|
24
|
+
stroke-dasharray: 1400;
|
|
25
|
+
stroke-dashoffset: 0;
|
|
26
|
+
animation: q-load 1.5s ease-in-out infinite;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@keyframes q-spin {
|
|
33
|
+
0% {
|
|
34
|
+
transform: rotate3d(0, 0, 1, 0deg);
|
|
35
|
+
}
|
|
36
|
+
25% {
|
|
37
|
+
transform: rotate3d(0, 0, 1, 90deg);
|
|
38
|
+
}
|
|
39
|
+
50% {
|
|
40
|
+
transform: rotate3d(0, 0, 1, 180deg);
|
|
41
|
+
}
|
|
42
|
+
75% {
|
|
43
|
+
transform: rotate3d(0, 0, 1, 270deg);
|
|
44
|
+
}
|
|
45
|
+
100% {
|
|
46
|
+
transform: rotate3d(0, 0, 1, 359deg);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@keyframes q-load {
|
|
51
|
+
0% {
|
|
52
|
+
stroke-dasharray: 1, 400;
|
|
53
|
+
stroke-dashoffset: 0;
|
|
54
|
+
}
|
|
55
|
+
50% {
|
|
56
|
+
stroke-dasharray: 400, 400;
|
|
57
|
+
stroke-dashoffset: -100;
|
|
58
|
+
}
|
|
59
|
+
100% {
|
|
60
|
+
stroke-dasharray: 400, 400;
|
|
61
|
+
stroke-dashoffset: -300;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -1,26 +1,112 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
<svelte:options runes={true} />
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { useSize } from "../../composables/useSize";
|
|
5
|
+
import { between } from "../../utils/number";
|
|
6
|
+
const radius = 50,
|
|
7
|
+
diameter = 2 * radius,
|
|
8
|
+
circumference = diameter * Math.PI,
|
|
9
|
+
strokeDashArray = Math.round(circumference * 1e3) / 1e3;
|
|
10
|
+
let {
|
|
11
|
+
value = 0,
|
|
12
|
+
indeterminate = false,
|
|
13
|
+
size = "2em",
|
|
14
|
+
fontSize = "0.25em",
|
|
15
|
+
color = "primary",
|
|
16
|
+
trackColor = "secondary-container",
|
|
17
|
+
thickness = 0.2,
|
|
18
|
+
min = 0,
|
|
19
|
+
max = 100,
|
|
20
|
+
angle = 0,
|
|
21
|
+
noRound = false,
|
|
22
|
+
instantFeedback = false,
|
|
23
|
+
animationSpeed = 600,
|
|
24
|
+
showValue = false,
|
|
25
|
+
children = fallback,
|
|
26
|
+
...props
|
|
27
|
+
} = $props();
|
|
28
|
+
const qSize = $derived(useSize(size, "q-circular-progress"));
|
|
29
|
+
const svgStyle = $derived(`rotate3d(0, 0, 1, ${angle - 90}deg)`);
|
|
30
|
+
const circleStyle = $derived(
|
|
31
|
+
instantFeedback || indeterminate
|
|
32
|
+
? void 0
|
|
33
|
+
: `stroke-dashoffset ${animationSpeed}ms ease 0s, stroke ${animationSpeed}ms ease`,
|
|
34
|
+
);
|
|
35
|
+
const viewBox = $derived(diameter / (1 - thickness / 2));
|
|
36
|
+
const viewBoxAttr = $derived(
|
|
37
|
+
`${viewBox / 2} ${viewBox / 2} ${viewBox} ${viewBox}`,
|
|
38
|
+
);
|
|
39
|
+
const normalized = $derived(between(value, min, max));
|
|
40
|
+
const range = $derived(max - min);
|
|
41
|
+
const strokeWidth = $derived((thickness / 2) * viewBox);
|
|
42
|
+
const strokeDashOffset = $derived.by(() => {
|
|
43
|
+
const dashRatio = (max - normalized) / range;
|
|
44
|
+
const dashGap =
|
|
45
|
+
!noRound && normalized < max && dashRatio < 0.25
|
|
46
|
+
? (strokeWidth / 2) * (1 - dashRatio / 0.25)
|
|
47
|
+
: 0;
|
|
48
|
+
return circumference * dashRatio + dashGap;
|
|
12
49
|
});
|
|
13
50
|
</script>
|
|
14
51
|
|
|
15
|
-
<
|
|
52
|
+
<div
|
|
53
|
+
{...props}
|
|
54
|
+
class="q-circular-progress{props.class ? ` ${props.class}` : ''}"
|
|
55
|
+
class:q-circular-progress--indeterminate={indeterminate}
|
|
56
|
+
style:--size={qSize.style}
|
|
57
|
+
role="progressbar"
|
|
58
|
+
aria-valuemin={min}
|
|
59
|
+
aria-valuemax={max}
|
|
60
|
+
aria-valuenow={indeterminate ? undefined : normalized}
|
|
61
|
+
>
|
|
62
|
+
<svg
|
|
63
|
+
class="q-circular-progress__svg"
|
|
64
|
+
style:transform={svgStyle}
|
|
65
|
+
viewBox={viewBoxAttr}
|
|
66
|
+
aria-hidden="true"
|
|
67
|
+
>
|
|
68
|
+
{#if trackColor && trackColor !== "transparent"}
|
|
69
|
+
{@render circle({
|
|
70
|
+
cls: "track",
|
|
71
|
+
offset: 0,
|
|
72
|
+
color: trackColor,
|
|
73
|
+
})}
|
|
74
|
+
{/if}
|
|
75
|
+
|
|
76
|
+
{@render circle({
|
|
77
|
+
cls: "indicator",
|
|
78
|
+
offset: strokeDashOffset,
|
|
79
|
+
color,
|
|
80
|
+
rounded: !noRound,
|
|
81
|
+
})}
|
|
82
|
+
</svg>
|
|
83
|
+
|
|
84
|
+
{#if showValue}
|
|
85
|
+
<div
|
|
86
|
+
class="q-circular-progress__text absolute-full flex flex-center"
|
|
87
|
+
style:font-size={fontSize}
|
|
88
|
+
>
|
|
89
|
+
{@render children()}
|
|
90
|
+
</div>
|
|
91
|
+
{/if}
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
{#snippet fallback()}
|
|
95
|
+
<div>{Math.round(normalized)}</div>
|
|
96
|
+
{/snippet}
|
|
97
|
+
|
|
98
|
+
{#snippet circle({ offset, color, cls, rounded }: CircleParams)}
|
|
16
99
|
<circle
|
|
17
|
-
class="
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
r="20"
|
|
21
|
-
fill="none"
|
|
100
|
+
class="q-circular-progress__{cls}{color ? ` text-${color}` : ''}"
|
|
101
|
+
style:transition={circleStyle}
|
|
102
|
+
fill="transparent"
|
|
22
103
|
stroke="currentColor"
|
|
23
|
-
stroke-width={
|
|
24
|
-
stroke-
|
|
104
|
+
stroke-width={strokeWidth}
|
|
105
|
+
stroke-dasharray={strokeDashArray}
|
|
106
|
+
stroke-dashoffset={offset}
|
|
107
|
+
stroke-linecap={rounded ? "round" : undefined}
|
|
108
|
+
cx={viewBox}
|
|
109
|
+
cy={viewBox}
|
|
110
|
+
r={radius}
|
|
25
111
|
/>
|
|
26
|
-
|
|
112
|
+
{/snippet}
|
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import type { QCircularProgressProps } from "./props";
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
value?: number | undefined;
|
|
6
|
-
indeterminate?: boolean | undefined;
|
|
7
|
-
size?: string | number | undefined;
|
|
8
|
-
color?: QCircularProgressProps["color"];
|
|
9
|
-
thickness?: number | undefined;
|
|
10
|
-
class?: string | undefined;
|
|
11
|
-
};
|
|
12
|
-
events: {
|
|
13
|
-
[evt: string]: CustomEvent<any>;
|
|
14
|
-
};
|
|
15
|
-
slots: {};
|
|
16
|
-
};
|
|
17
|
-
type QCircularProgressProps_ = typeof __propDef.props;
|
|
18
|
-
export { QCircularProgressProps_ as QCircularProgressProps };
|
|
19
|
-
export type QCircularProgressEvents = typeof __propDef.events;
|
|
20
|
-
export type QCircularProgressSlots = typeof __propDef.slots;
|
|
21
|
-
export default class QCircularProgress extends SvelteComponent<QCircularProgressProps, QCircularProgressEvents, QCircularProgressSlots> {
|
|
22
|
-
}
|
|
2
|
+
declare const QCircularProgress: import("svelte").Component<QCircularProgressProps, {}, "">;
|
|
3
|
+
export default QCircularProgress;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
@use "$css/mixins";
|
|
2
|
+
|
|
3
|
+
.q-linear-progress {
|
|
4
|
+
position: relative;
|
|
5
|
+
|
|
6
|
+
flex-grow: 1;
|
|
7
|
+
height: 0.75em;
|
|
8
|
+
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
|
|
11
|
+
transform: scale3d(1, 1, 1);
|
|
12
|
+
|
|
13
|
+
&__indicator {
|
|
14
|
+
background-color: var(--q-indicator-color);
|
|
15
|
+
height: 100%;
|
|
16
|
+
|
|
17
|
+
&--indeterminate {
|
|
18
|
+
transition: none;
|
|
19
|
+
background-color: transparent;
|
|
20
|
+
|
|
21
|
+
&::before,
|
|
22
|
+
&::after {
|
|
23
|
+
content: "";
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 0;
|
|
26
|
+
right: 0;
|
|
27
|
+
bottom: 0;
|
|
28
|
+
left: 0;
|
|
29
|
+
|
|
30
|
+
background-color: var(--q-indicator-color);
|
|
31
|
+
transform-origin: 0 0;
|
|
32
|
+
border-radius: inherit;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&::before {
|
|
36
|
+
animation: q-progress 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&::after {
|
|
40
|
+
transform: translate3d(-101%, 0, 0) scale3d(1, 1, 1);
|
|
41
|
+
animation: q-progress-fast 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
|
|
42
|
+
animation-delay: 1.15s;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&__track {
|
|
48
|
+
opacity: 0.4;
|
|
49
|
+
height: 100%;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@keyframes q-progress {
|
|
54
|
+
0% {
|
|
55
|
+
transform: translate3d(-35%, 0, 0) scale3d(0.35, 1, 1);
|
|
56
|
+
}
|
|
57
|
+
60% {
|
|
58
|
+
transform: translate3d(100%, 0, 0) scale3d(0.9, 1, 1);
|
|
59
|
+
}
|
|
60
|
+
100% {
|
|
61
|
+
transform: translate3d(100%, 0, 0) scale3d(0.9, 1, 1);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@keyframes q-progress-fast {
|
|
66
|
+
0% {
|
|
67
|
+
transform: translate3d(-101%, 0, 0) scale3d(1, 1, 1);
|
|
68
|
+
}
|
|
69
|
+
60% {
|
|
70
|
+
transform: translate3d(107%, 0, 0) scale3d(0.01, 1, 1);
|
|
71
|
+
}
|
|
72
|
+
100% {
|
|
73
|
+
transform: translate3d(107%, 0, 0) scale3d(0.01, 1, 1);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -1,20 +1,62 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
<svelte:options runes={true} />
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { useSize } from "../../composables/useSize";
|
|
5
|
+
function width(val, reverse2) {
|
|
6
|
+
return reverse2
|
|
7
|
+
? `translateX(100%) scale3d(-${val}, 1, 1)`
|
|
8
|
+
: `scale3d(${val}, 1, 1)`;
|
|
9
|
+
}
|
|
10
|
+
let {
|
|
11
|
+
value = 0,
|
|
12
|
+
buffer,
|
|
13
|
+
reverse = false,
|
|
14
|
+
noRound = false,
|
|
15
|
+
size = "0.375em",
|
|
16
|
+
color = "primary",
|
|
17
|
+
animationSpeed = 600,
|
|
18
|
+
instantFeedback = false,
|
|
19
|
+
trackColor = "secondary-container",
|
|
20
|
+
indeterminate = false,
|
|
21
|
+
...props
|
|
22
|
+
} = $props();
|
|
23
|
+
const normalized = $derived(value > 1 ? value / 100 : value);
|
|
24
|
+
const qSize = $derived(useSize(size, "q-linear-progress"));
|
|
25
|
+
const radius = $derived(noRound ? "0" : "0.75rem");
|
|
26
|
+
const origin = $derived(reverse ? "0 100%" : "0 0");
|
|
27
|
+
const transition = $derived(
|
|
28
|
+
instantFeedback || indeterminate ? void 0 : `transform ${animationSpeed}ms`,
|
|
29
|
+
);
|
|
30
|
+
const trackTransform = $derived(width(buffer ?? 1, reverse));
|
|
31
|
+
const indicatorTransform = $derived(
|
|
32
|
+
width(+indeterminate || normalized, reverse),
|
|
33
|
+
);
|
|
16
34
|
</script>
|
|
17
35
|
|
|
18
|
-
<div
|
|
19
|
-
|
|
36
|
+
<div
|
|
37
|
+
{...props}
|
|
38
|
+
class="q-linear-progress{props.class ? ` ${props.class}` : ''}"
|
|
39
|
+
style:font-size={qSize.style}
|
|
40
|
+
style:border-radius={radius}
|
|
41
|
+
role="progressbar"
|
|
42
|
+
aria-valuemin="0"
|
|
43
|
+
aria-valuemax="100"
|
|
44
|
+
aria-valuenow={indeterminate ? undefined : normalized}
|
|
45
|
+
>
|
|
46
|
+
<div
|
|
47
|
+
class="q-linear-progress__track absolute-full"
|
|
48
|
+
style:transition
|
|
49
|
+
style:transform-origin={origin}
|
|
50
|
+
style:background-color="var(--{trackColor}, {trackColor})"
|
|
51
|
+
style:transform={trackTransform}
|
|
52
|
+
></div>
|
|
53
|
+
|
|
54
|
+
<div
|
|
55
|
+
class="q-linear-progress__indicator"
|
|
56
|
+
class:q-linear-progress__indicator--indeterminate={indeterminate}
|
|
57
|
+
style:--q-indicator-color="var(--{color}, {color})"
|
|
58
|
+
style:transition
|
|
59
|
+
style:transform={indicatorTransform}
|
|
60
|
+
style:transform-origin={origin}
|
|
61
|
+
></div>
|
|
20
62
|
</div>
|