@quaffui/quaff 0.1.0-prealpha2 → 0.1.0-prealpha21
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 +78 -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 +44 -34
- 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,9 +1,14 @@
|
|
|
1
|
+
@use "$css/variables";
|
|
2
|
+
|
|
1
3
|
//? Basic styles
|
|
2
4
|
.q-avatar {
|
|
3
5
|
object-fit: cover;
|
|
4
6
|
object-position: center;
|
|
5
7
|
aspect-ratio: 1;
|
|
6
|
-
transition:
|
|
8
|
+
transition:
|
|
9
|
+
variables.$speed3 transform,
|
|
10
|
+
variables.$speed3 border-radius,
|
|
11
|
+
variables.$speed3 padding;
|
|
7
12
|
border-radius: 0;
|
|
8
13
|
|
|
9
14
|
display: flex;
|
|
@@ -1,25 +1,43 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
2
3
|
export type QAvatarShapeOptions = "circle" | "rounded" | "top-round" | "left-round" | "right-round" | "bottom-round" | "top-left-round" | "top-right-round" | "bottom-left-round" | "bottom-right-round";
|
|
3
|
-
export type QAvatarSizeOptions =
|
|
4
|
-
export interface QAvatarProps extends
|
|
4
|
+
export type QAvatarSizeOptions = Q.Size | Q.CssValue | number;
|
|
5
|
+
export interface QAvatarProps extends HTMLAttributes<HTMLElement> {
|
|
5
6
|
/**
|
|
6
7
|
* Shape of the avatar.
|
|
7
|
-
*
|
|
8
|
+
*
|
|
9
|
+
* @default "circle"
|
|
8
10
|
*/
|
|
9
11
|
shape?: QAvatarShapeOptions;
|
|
10
12
|
/**
|
|
11
13
|
* Size of the avatar, can be a custom size using CSS units. If no unit is specified, "px" will be used.
|
|
12
|
-
*
|
|
14
|
+
*
|
|
15
|
+
* @default "md"
|
|
13
16
|
*/
|
|
14
17
|
size?: QAvatarSizeOptions;
|
|
15
18
|
/**
|
|
16
|
-
* Source of the image to
|
|
19
|
+
* Source of the image to be used as the avatar. Can be a url or a path to a local file.
|
|
20
|
+
*
|
|
17
21
|
* @default undefined
|
|
18
22
|
*/
|
|
19
23
|
src?: string;
|
|
20
24
|
/**
|
|
21
|
-
* If set to true,
|
|
25
|
+
* If set to true, the "src" prop will be used as a video source.
|
|
26
|
+
*
|
|
22
27
|
* @default false
|
|
23
28
|
*/
|
|
24
29
|
video?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* alt property for the image.
|
|
32
|
+
*
|
|
33
|
+
* @default undefined
|
|
34
|
+
*/
|
|
35
|
+
alt?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Accessibility controls you might want to add inside the <video> element.
|
|
38
|
+
* For example, you might want to add a <p> tag in case the video player doesn't work.
|
|
39
|
+
*
|
|
40
|
+
* @default undefined
|
|
41
|
+
*/
|
|
42
|
+
videoAccessibility?: Snippet;
|
|
25
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
@@ -1,18 +1,27 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
let
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
<svelte:options runes={true} />
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { setContext, untrack } from "svelte";
|
|
5
|
+
let {
|
|
6
|
+
activeColor = "primary",
|
|
7
|
+
gutter = "sm",
|
|
8
|
+
separator = "/",
|
|
9
|
+
separatorColor = "outline",
|
|
10
|
+
children,
|
|
11
|
+
...props
|
|
12
|
+
} = $props();
|
|
13
|
+
let breadrumbElement;
|
|
14
|
+
$effect(() => {
|
|
15
|
+
untrack(() => breadrumbElement.firstChild?.remove());
|
|
13
16
|
});
|
|
17
|
+
setContext("activeColor", activeColor);
|
|
18
|
+
setContext("separator", { type: separator, color: separatorColor, gutter });
|
|
14
19
|
</script>
|
|
15
20
|
|
|
16
|
-
<div
|
|
17
|
-
|
|
21
|
+
<div
|
|
22
|
+
bind:this={breadrumbElement}
|
|
23
|
+
{...props}
|
|
24
|
+
class="q-breadcrumbs{props.class ? ` ${props.class}` : ''}"
|
|
25
|
+
>
|
|
26
|
+
{@render children?.()}
|
|
18
27
|
</div>
|
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import type { QBreadcrumbsProps } from "./props";
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
separator?: QBreadcrumbsProps["separator"];
|
|
6
|
-
gutter?: QBreadcrumbsProps["gutter"];
|
|
7
|
-
activeColor?: QBreadcrumbsProps["activeColor"];
|
|
8
|
-
separatorColor?: QBreadcrumbsProps["separatorColor"];
|
|
9
|
-
class?: string | undefined;
|
|
10
|
-
};
|
|
11
|
-
events: {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
};
|
|
14
|
-
slots: {
|
|
15
|
-
default: {};
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
type QBreadcrumbsProps_ = typeof __propDef.props;
|
|
19
|
-
export { QBreadcrumbsProps_ as QBreadcrumbsProps };
|
|
20
|
-
export type QBreadcrumbsEvents = typeof __propDef.events;
|
|
21
|
-
export type QBreadcrumbsSlots = typeof __propDef.slots;
|
|
22
|
-
export default class QBreadcrumbs extends SvelteComponent<QBreadcrumbsProps, QBreadcrumbsEvents, QBreadcrumbsSlots> {
|
|
23
|
-
}
|
|
2
|
+
declare const QBreadcrumbs: import("svelte").Component<QBreadcrumbsProps, {}, "">;
|
|
3
|
+
export default QBreadcrumbs;
|
|
@@ -1,59 +1,75 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
quaffClasses: [`q-px-${separator.gutter}`]
|
|
24
|
-
});
|
|
1
|
+
<svelte:options runes={true} />
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import { getContext } from "svelte";
|
|
5
|
+
import { derived } from "svelte/store";
|
|
6
|
+
import { isRouteActive } from "../../utils/router";
|
|
7
|
+
import QIcon from "../icon/QIcon.svelte";
|
|
8
|
+
let {
|
|
9
|
+
activeClass = "active",
|
|
10
|
+
href,
|
|
11
|
+
label = "",
|
|
12
|
+
icon,
|
|
13
|
+
tag = "div",
|
|
14
|
+
to,
|
|
15
|
+
children = fallback,
|
|
16
|
+
...props
|
|
17
|
+
} = $props();
|
|
18
|
+
const activeColor = getContext("activeColor");
|
|
19
|
+
const separator = getContext("separator");
|
|
20
|
+
const classesIfActive = derived(isRouteActive, ($isRouteActive) =>
|
|
21
|
+
$isRouteActive(href || to) ? `${activeClass} text-${activeColor}` : void 0,
|
|
22
|
+
);
|
|
25
23
|
</script>
|
|
26
24
|
|
|
27
|
-
|
|
28
|
-
{
|
|
29
|
-
|
|
25
|
+
{#snippet fallback()}
|
|
26
|
+
{label}
|
|
27
|
+
{/snippet}
|
|
28
|
+
|
|
29
|
+
{#snippet breadcrumbEl()}
|
|
30
|
+
{#if icon !== undefined}
|
|
31
|
+
{#if typeof icon === "string"}
|
|
32
|
+
<QIcon name={icon} size="1rem" />
|
|
33
|
+
{:else}
|
|
34
|
+
{@render icon()}
|
|
35
|
+
{/if}
|
|
36
|
+
{/if}
|
|
37
|
+
|
|
38
|
+
{@render children()}
|
|
39
|
+
{/snippet}
|
|
40
|
+
|
|
41
|
+
<div
|
|
42
|
+
{...props}
|
|
43
|
+
class="q-breadcrumbs__separator q-px-{separator.gutter}{props.class
|
|
44
|
+
? ` ${props.class}`
|
|
45
|
+
: ''}"
|
|
46
|
+
>
|
|
47
|
+
{#if typeof separator.type === "string"}
|
|
48
|
+
{#if separator.type.startsWith("icon:")}
|
|
49
|
+
<QIcon
|
|
50
|
+
name={separator.type.replace("icon:", "") as MaterialSymbol}
|
|
51
|
+
size="1rem"
|
|
52
|
+
/>
|
|
53
|
+
{:else}
|
|
54
|
+
{separator.type}
|
|
55
|
+
{/if}
|
|
30
56
|
{:else}
|
|
31
|
-
{separator.type}
|
|
57
|
+
{@render separator.type()}
|
|
32
58
|
{/if}
|
|
33
59
|
</div>
|
|
34
60
|
|
|
35
61
|
{#if href !== undefined || to !== undefined}
|
|
36
|
-
<a
|
|
37
|
-
{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{/if}
|
|
42
|
-
|
|
43
|
-
<slot>
|
|
44
|
-
{label}
|
|
45
|
-
</slot>
|
|
62
|
+
<a
|
|
63
|
+
href={href || to}
|
|
64
|
+
class="q-breadcrumbs__el{$classesIfActive ? ` ${$classesIfActive}` : ''}"
|
|
65
|
+
>
|
|
66
|
+
{@render breadcrumbEl()}
|
|
46
67
|
</a>
|
|
47
68
|
{:else}
|
|
48
|
-
<svelte:element
|
|
49
|
-
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
{/if}
|
|
54
|
-
|
|
55
|
-
<slot>
|
|
56
|
-
{label}
|
|
57
|
-
</slot>
|
|
69
|
+
<svelte:element
|
|
70
|
+
this={tag}
|
|
71
|
+
class="q-breadcrumbs__el{$classesIfActive ? ` ${$classesIfActive}` : ''}"
|
|
72
|
+
>
|
|
73
|
+
{@render breadcrumbEl()}
|
|
58
74
|
</svelte:element>
|
|
59
75
|
{/if}
|
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import type { QBreadcrumbsElProps } from "./props";
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
label?: QBreadcrumbsElProps["label"];
|
|
6
|
-
icon?: QBreadcrumbsElProps["icon"];
|
|
7
|
-
tag?: QBreadcrumbsElProps["tag"];
|
|
8
|
-
to?: QBreadcrumbsElProps["to"];
|
|
9
|
-
href?: QBreadcrumbsElProps["href"];
|
|
10
|
-
activeClass?: QBreadcrumbsElProps["activeClass"];
|
|
11
|
-
class?: string | undefined;
|
|
12
|
-
};
|
|
13
|
-
events: {
|
|
14
|
-
[evt: string]: CustomEvent<any>;
|
|
15
|
-
};
|
|
16
|
-
slots: {
|
|
17
|
-
icon: {};
|
|
18
|
-
default: {};
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
type QBreadcrumbsElProps_ = typeof __propDef.props;
|
|
22
|
-
export { QBreadcrumbsElProps_ as QBreadcrumbsElProps };
|
|
23
|
-
export type QBreadcrumbsElEvents = typeof __propDef.events;
|
|
24
|
-
export type QBreadcrumbsElSlots = typeof __propDef.slots;
|
|
25
|
-
export default class QBreadcrumbsEl extends SvelteComponent<QBreadcrumbsElProps, QBreadcrumbsElEvents, QBreadcrumbsElSlots> {
|
|
26
|
-
}
|
|
2
|
+
declare const QBreadcrumbsEl: import("svelte").Component<QBreadcrumbsElProps, {}, "">;
|
|
3
|
+
export default QBreadcrumbsEl;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "
|
|
2
|
-
export declare
|
|
1
|
+
import type { QComponentDocs } from "../../utils";
|
|
2
|
+
export declare const QBreadcrumbsDocs: QComponentDocs;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QBreadcrumbsDocsProps } from "./docs.props";
|
|
2
|
-
export
|
|
2
|
+
export const QBreadcrumbsDocs = {
|
|
3
3
|
name: "QBreadcrumbs",
|
|
4
4
|
description: "Breadcrumbs are mostly used as a navigation aid. They allow users to keep track of their location within the page.",
|
|
5
5
|
docs: {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
// AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
|
|
2
|
+
// @quaffHash 66c85971b241303d63478c8c8bca6aa0
|
|
1
3
|
export const QBreadcrumbsDocsProps = [
|
|
2
4
|
{
|
|
3
|
-
name: "
|
|
5
|
+
name: "activeColor",
|
|
4
6
|
type: "string",
|
|
5
7
|
optional: true,
|
|
6
8
|
clickableType: false,
|
|
7
|
-
description:
|
|
8
|
-
default: "
|
|
9
|
+
description: "Color to use for the active breadcrumb element. See <link to colors docs> to see what colors can be used.",
|
|
10
|
+
default: '"primary"',
|
|
9
11
|
},
|
|
10
12
|
{
|
|
11
13
|
name: "gutter",
|
|
@@ -13,15 +15,15 @@ export const QBreadcrumbsDocsProps = [
|
|
|
13
15
|
optional: true,
|
|
14
16
|
clickableType: true,
|
|
15
17
|
description: "Space around separators.",
|
|
16
|
-
default: "sm",
|
|
18
|
+
default: '"sm"',
|
|
17
19
|
},
|
|
18
20
|
{
|
|
19
|
-
name: "
|
|
20
|
-
type: "string",
|
|
21
|
+
name: "separator",
|
|
22
|
+
type: "string | `icon:${MaterialSymbol}` | Snippet",
|
|
21
23
|
optional: true,
|
|
22
|
-
clickableType:
|
|
23
|
-
description:
|
|
24
|
-
default: "
|
|
24
|
+
clickableType: true,
|
|
25
|
+
description: 'Separator to use between the breadcrumb elements. To use an icon, prefix with "icon:" followed by the name of the icon.',
|
|
26
|
+
default: '"/"',
|
|
25
27
|
},
|
|
26
28
|
{
|
|
27
29
|
name: "separatorColor",
|
|
@@ -29,56 +31,56 @@ export const QBreadcrumbsDocsProps = [
|
|
|
29
31
|
optional: true,
|
|
30
32
|
clickableType: false,
|
|
31
33
|
description: "Color to use for the separators. See <link to colors docs> to see what colors can be used.",
|
|
32
|
-
default: "outline",
|
|
34
|
+
default: '"outline"',
|
|
33
35
|
},
|
|
34
36
|
];
|
|
35
37
|
export const QBreadcrumbsElDocsProps = [
|
|
36
38
|
{
|
|
37
|
-
name: "
|
|
39
|
+
name: "activeClass",
|
|
38
40
|
type: "string",
|
|
39
41
|
optional: true,
|
|
40
42
|
clickableType: false,
|
|
41
|
-
description: "
|
|
42
|
-
default: '""',
|
|
43
|
+
description: "Class to apply to the breadcrumb element when the route is active.",
|
|
44
|
+
default: '"active"',
|
|
43
45
|
},
|
|
44
46
|
{
|
|
45
47
|
name: "icon",
|
|
46
|
-
type: "
|
|
48
|
+
type: "MaterialSymbol | Snippet",
|
|
47
49
|
optional: true,
|
|
48
|
-
clickableType:
|
|
50
|
+
clickableType: true,
|
|
49
51
|
description: "Name of the leading icon for the breadcrumb element. The icon prop overwrites to icon slot.",
|
|
50
52
|
default: "undefined",
|
|
51
53
|
},
|
|
52
54
|
{
|
|
53
|
-
name: "
|
|
55
|
+
name: "label",
|
|
54
56
|
type: "string",
|
|
55
57
|
optional: true,
|
|
56
58
|
clickableType: false,
|
|
57
|
-
description: "
|
|
58
|
-
default: '"
|
|
59
|
+
description: "Text to use for the breadcrumb element. If default slot is defined, the label will be overwritten by it.",
|
|
60
|
+
default: '""',
|
|
59
61
|
},
|
|
60
62
|
{
|
|
61
|
-
name: "
|
|
63
|
+
name: "href",
|
|
62
64
|
type: "string",
|
|
63
65
|
optional: true,
|
|
64
66
|
clickableType: false,
|
|
65
|
-
description: '
|
|
67
|
+
description: 'Also makes the breadcrumb element navigational. Can be used with the router (e.g to="/home") or as a normal href attribute (e.g to="#section-id")',
|
|
66
68
|
default: "undefined",
|
|
67
69
|
},
|
|
68
70
|
{
|
|
69
|
-
name: "
|
|
71
|
+
name: "tag",
|
|
70
72
|
type: "string",
|
|
71
73
|
optional: true,
|
|
72
74
|
clickableType: false,
|
|
73
|
-
description:
|
|
74
|
-
default: "
|
|
75
|
+
description: "Tag to use for the breadcrumb element.",
|
|
76
|
+
default: '"div"',
|
|
75
77
|
},
|
|
76
78
|
{
|
|
77
|
-
name: "
|
|
79
|
+
name: "to",
|
|
78
80
|
type: "string",
|
|
79
81
|
optional: true,
|
|
80
82
|
clickableType: false,
|
|
81
|
-
description:
|
|
82
|
-
default:
|
|
83
|
+
description: 'Makes the breadcrumb element navigational. Can be used with the router (e.g to="/home") or as a normal href attribute (e.g to="#section-id")',
|
|
84
|
+
default: "undefined",
|
|
83
85
|
},
|
|
84
86
|
];
|
|
@@ -1,38 +1,50 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { MaterialSymbol } from "material-symbols";
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
export type QBreadcrumbsGutterOptions = Exclude<Q.Size, "xs" | "xl">;
|
|
5
|
+
export interface QBreadcrumbsProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
6
|
/**
|
|
5
|
-
*
|
|
6
|
-
* @default
|
|
7
|
+
* Color to use for the active breadcrumb element. See <link to colors docs> to see what colors can be used.
|
|
8
|
+
* @default "primary"
|
|
7
9
|
*/
|
|
8
|
-
|
|
10
|
+
activeColor?: string;
|
|
9
11
|
/**
|
|
10
12
|
* Space around separators.
|
|
11
|
-
* @default sm
|
|
13
|
+
* @default "sm"
|
|
12
14
|
*/
|
|
13
15
|
gutter?: QBreadcrumbsGutterOptions;
|
|
14
16
|
/**
|
|
15
|
-
*
|
|
16
|
-
* @default
|
|
17
|
+
* Separator to use between the breadcrumb elements. To use an icon, prefix with "icon:" followed by the name of the icon.
|
|
18
|
+
* @default "/"
|
|
17
19
|
*/
|
|
18
|
-
|
|
20
|
+
separator?: string | `icon:${MaterialSymbol}` | Snippet;
|
|
19
21
|
/**
|
|
20
22
|
* Color to use for the separators. See <link to colors docs> to see what colors can be used.
|
|
21
|
-
* @default outline
|
|
23
|
+
* @default "outline"
|
|
22
24
|
*/
|
|
23
25
|
separatorColor?: string;
|
|
24
26
|
}
|
|
25
|
-
export interface QBreadcrumbsElProps extends
|
|
27
|
+
export interface QBreadcrumbsElProps extends HTMLAttributes<HTMLElement> {
|
|
28
|
+
/**
|
|
29
|
+
* Class to apply to the breadcrumb element when the route is active.
|
|
30
|
+
* @default "active"
|
|
31
|
+
*/
|
|
32
|
+
activeClass?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Name of the leading icon for the breadcrumb element. The icon prop overwrites to icon slot.
|
|
35
|
+
* @default undefined
|
|
36
|
+
*/
|
|
37
|
+
icon?: MaterialSymbol | Snippet;
|
|
26
38
|
/**
|
|
27
39
|
* Text to use for the breadcrumb element. If default slot is defined, the label will be overwritten by it.
|
|
28
40
|
* @default ""
|
|
29
41
|
*/
|
|
30
42
|
label?: string;
|
|
31
43
|
/**
|
|
32
|
-
*
|
|
44
|
+
* Also makes the breadcrumb element navigational. Can be used with the router (e.g to="/home") or as a normal href attribute (e.g to="#section-id")
|
|
33
45
|
* @default undefined
|
|
34
46
|
*/
|
|
35
|
-
|
|
47
|
+
href?: string;
|
|
36
48
|
/**
|
|
37
49
|
* Tag to use for the breadcrumb element.
|
|
38
50
|
* @default "div"
|
|
@@ -43,14 +55,4 @@ export interface QBreadcrumbsElProps extends NativeProps {
|
|
|
43
55
|
* @default undefined
|
|
44
56
|
*/
|
|
45
57
|
to?: string;
|
|
46
|
-
/**
|
|
47
|
-
* Also makes the breadcrumb element navigational. Can be used with the router (e.g to="/home") or as a normal href attribute (e.g to="#section-id")
|
|
48
|
-
* @default undefined
|
|
49
|
-
*/
|
|
50
|
-
href?: string;
|
|
51
|
-
/**
|
|
52
|
-
* Class to apply to the breadcrumb element when the route is active.
|
|
53
|
-
* @default "active"
|
|
54
|
-
*/
|
|
55
|
-
activeClass?: string;
|
|
56
58
|
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
@use "$css/mixins";
|
|
2
|
+
@use "$css/variables";
|
|
3
|
+
@use "$css/disabled";
|
|
4
|
+
|
|
5
|
+
@layer q-btn {
|
|
6
|
+
.q-btn {
|
|
7
|
+
position: relative;
|
|
8
|
+
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
|
|
13
|
+
margin: 0 0.5rem;
|
|
14
|
+
padding: 0 1.5rem;
|
|
15
|
+
|
|
16
|
+
box-sizing: content-box;
|
|
17
|
+
border: none;
|
|
18
|
+
outline: inherit;
|
|
19
|
+
|
|
20
|
+
background-color: transparent;
|
|
21
|
+
color: var(--ripple-color);
|
|
22
|
+
|
|
23
|
+
font-family: inherit;
|
|
24
|
+
font-size: 0.875rem;
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
line-height: normal;
|
|
27
|
+
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
user-select: none;
|
|
30
|
+
text-decoration: none;
|
|
31
|
+
|
|
32
|
+
transition:
|
|
33
|
+
variables.$speed3 transform,
|
|
34
|
+
variables.$speed3 border-radius,
|
|
35
|
+
variables.$speed3 padding;
|
|
36
|
+
|
|
37
|
+
@include mixins.btn-image;
|
|
38
|
+
|
|
39
|
+
$sizeMap: (
|
|
40
|
+
"sm": -1,
|
|
41
|
+
"md": 0,
|
|
42
|
+
"lg": 1,
|
|
43
|
+
"xl": 2,
|
|
44
|
+
);
|
|
45
|
+
@each $size, $val in $sizeMap {
|
|
46
|
+
&--#{$size} {
|
|
47
|
+
height: 2.5rem + 0.5 * $val;
|
|
48
|
+
min-width: 2.5rem + 0.5 * $val;
|
|
49
|
+
|
|
50
|
+
border-radius: 1.25rem + 0.25 * $val;
|
|
51
|
+
|
|
52
|
+
font-size: 1rem + 0.125 * $val;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:not([aria-disabled]):hover::after {
|
|
57
|
+
@include mixins.overlay(var(--ripple-color), 0.08);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:not([aria-disabled]):focus::after {
|
|
61
|
+
@include mixins.overlay(var(--ripple-color), 0.1);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&--elevated {
|
|
65
|
+
&:not(.q-btn--unelevated, [aria-disabled]) {
|
|
66
|
+
@include mixins.elevate(1, "bottom");
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
background-color: var(--surface-container-low);
|
|
70
|
+
|
|
71
|
+
// Surface tint overlay
|
|
72
|
+
&::before {
|
|
73
|
+
@include mixins.overlay(var(--surface-tint), 0.12);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&--filled {
|
|
78
|
+
background-color: var(--primary);
|
|
79
|
+
|
|
80
|
+
&:hover:not([aria-disabled]) {
|
|
81
|
+
@include mixins.elevate(1, "bottom");
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&--tonal {
|
|
86
|
+
background-color: var(--secondary-container);
|
|
87
|
+
|
|
88
|
+
&:hover:not([aria-disabled]) {
|
|
89
|
+
@include mixins.elevate(1, "bottom");
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&--outlined {
|
|
94
|
+
outline: solid 0.0625rem var(--outline);
|
|
95
|
+
|
|
96
|
+
&:not([aria-disabled]):focus {
|
|
97
|
+
outline-color: var(--primary);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&--round {
|
|
102
|
+
width: 2.5rem;
|
|
103
|
+
height: 2.5rem;
|
|
104
|
+
border-radius: 50%;
|
|
105
|
+
padding: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&--rectangle {
|
|
109
|
+
border-radius: 0.5rem;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.q-btn:not(.q-btn--round) > :is(.q-icon, .q-btn__img, .q-circular-progress) {
|
|
114
|
+
margin-left: -0.5rem;
|
|
115
|
+
margin-right: 0.5rem;
|
|
116
|
+
--size: 1.5rem;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Disabled
|
|
121
|
+
@layer q-btn--disabled {
|
|
122
|
+
.q-btn[aria-disabled] {
|
|
123
|
+
@include disabled.base();
|
|
124
|
+
|
|
125
|
+
&:not(.q-btn--outlined, .q-btn--flat) {
|
|
126
|
+
background-color: disabled.rest-color();
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&.q-btn--outlined {
|
|
130
|
+
outline-color: disabled.rest-color();
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|