@quaffui/quaff 0.1.0-prealpha12 → 0.1.0-prealpha14
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 +2 -2
- package/dist/components/avatar/docs.d.ts +1 -1
- package/dist/components/avatar/props.d.ts +1 -1
- package/dist/components/breadcrumbs/QBreadcrumbs.svelte +1 -1
- package/dist/components/breadcrumbs/QBreadcrumbsEl.svelte +5 -5
- package/dist/components/breadcrumbs/docs.d.ts +1 -1
- package/dist/components/breadcrumbs/props.d.ts +1 -1
- package/dist/components/button/QBtn.svelte +12 -8
- package/dist/components/button/docs.d.ts +1 -1
- package/dist/components/button/docs.props.js +16 -0
- package/dist/components/button/props.d.ts +1 -1
- package/dist/components/card/QCard.svelte +2 -2
- package/dist/components/card/QCardActions.svelte +2 -2
- package/dist/components/card/QCardSection.svelte +1 -1
- package/dist/components/card/docs.d.ts +1 -1
- package/dist/components/card/docs.props.js +1 -1
- package/dist/components/card/props.d.ts +2 -2
- package/dist/components/checkbox/QCheckbox.svelte +1 -1
- package/dist/components/checkbox/docs.d.ts +1 -1
- package/dist/components/checkbox/props.d.ts +1 -1
- package/dist/components/chip/QChip.svelte +26 -10
- 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 +8 -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/dialog/QDialog.svelte +3 -3
- package/dist/components/dialog/docs.d.ts +1 -1
- package/dist/components/dialog/docs.props.js +16 -0
- package/dist/components/dialog/props.d.ts +1 -1
- package/dist/components/drawer/QDrawer.svelte +3 -3
- package/dist/components/drawer/docs.d.ts +1 -1
- package/dist/components/drawer/docs.props.js +1 -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 +4 -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 +70 -0
- package/dist/components/icon/QIcon.svelte +2 -4
- package/dist/components/icon/docs.d.ts +1 -1
- package/dist/components/icon/docs.props.js +4 -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 +5 -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 +7 -7
- package/dist/components/layout/index.scss +2 -6
- package/dist/components/layout/props.d.ts +1 -1
- package/dist/components/list/QItem.svelte +5 -5
- package/dist/components/list/QItemSection.svelte +7 -7
- package/dist/components/list/QList.svelte +1 -1
- package/dist/components/list/docs.d.ts +1 -1
- package/dist/components/list/docs.props.js +43 -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 +1 -2
- package/dist/components/progress/QCircularProgress.svelte +3 -4
- package/dist/components/progress/QLinearProgress.svelte +1 -1
- package/dist/components/progress/docs.d.ts +1 -1
- package/dist/components/progress/docs.props.js +15 -15
- package/dist/components/progress/props.d.ts +1 -1
- package/dist/components/radio/QRadio.svelte +1 -1
- package/dist/components/radio/docs.d.ts +1 -1
- package/dist/components/radio/docs.props.js +3 -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 +7 -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 +4 -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 +50 -55
- 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 +13 -13
- package/dist/components/separator/index.scss +52 -0
- package/dist/components/separator/props.d.ts +3 -3
- package/dist/components/table/QTable.svelte +2 -4
- 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 +1 -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 +2 -2
- 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 +1 -2
- package/dist/components/toggle/docs.d.ts +1 -1
- package/dist/components/toggle/props.d.ts +1 -1
- package/dist/components/toggle/props.js +1 -1
- package/dist/components/toolbar/QToolbar.svelte +2 -2
- package/dist/components/toolbar/QToolbarTitle.svelte +1 -1
- package/dist/components/toolbar/docs.d.ts +1 -1
- package/dist/components/toolbar/docs.props.js +24 -8
- package/dist/components/toolbar/props.d.ts +1 -1
- package/dist/components/tooltip/QTooltip.svelte +1 -1
- package/dist/components/tooltip/docs.d.ts +1 -1
- package/dist/components/tooltip/docs.props.js +1 -1
- 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 +52 -0
- package/dist/css/mixins.scss +3 -4
- package/dist/css/shared/q-field.scss +305 -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/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 +1 -1
- package/package.json +22 -23
- 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,7 +1,5 @@
|
|
|
1
|
-
<script>import { createClasses } from "../../utils
|
|
2
|
-
import QBtn from "
|
|
3
|
-
import QIcon from "../icon/QIcon.svelte";
|
|
4
|
-
import QSelect from "../select/QSelect.svelte";
|
|
1
|
+
<script>import { createClasses } from "../../utils";
|
|
2
|
+
import { QIcon, QSelect, QBtn } from "../..";
|
|
5
3
|
export let columns = [], rows = [], flat = void 0, bordered = void 0, dense = false, userClasses = "";
|
|
6
4
|
export { userClasses as class };
|
|
7
5
|
function getField(fieldRaw, row) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { QTableProps } from "./props";
|
|
3
|
-
import type { QTableColumn, QTableRow } from "./props";
|
|
2
|
+
import type { QTableProps, QTableColumn, QTableRow } from "./props";
|
|
4
3
|
declare const __propDef: {
|
|
5
4
|
props: {
|
|
6
5
|
[x: string]: any;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "../../utils
|
|
1
|
+
import type { QComponentDocs } from "../../utils";
|
|
2
2
|
export declare let QTableDocs: QComponentDocs;
|
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
<script>import { QIcon } from "../..";
|
|
2
|
+
import { isRouteActive } from "../../composables";
|
|
3
|
+
import { ripple } from "../../helpers";
|
|
4
|
+
import { Quaff } from "../../stores";
|
|
5
|
+
import {
|
|
6
|
+
createClasses,
|
|
7
|
+
isActivationKey,
|
|
8
|
+
isArrowKey,
|
|
9
|
+
getDirection,
|
|
10
|
+
getClosestFocusableSibling,
|
|
11
|
+
isTabKey,
|
|
12
|
+
getClosestFocusableBlock
|
|
13
|
+
} from "../../utils";
|
|
14
|
+
import { hasContext, getContext, onMount } from "svelte";
|
|
15
|
+
import { get } from "svelte/store";
|
|
16
|
+
export let name, to = void 0, icon = void 0, userClasses = "";
|
|
10
17
|
export { userClasses as class };
|
|
11
|
-
let index = 1;
|
|
12
18
|
let qTab;
|
|
13
|
-
|
|
19
|
+
const qTabStore = getContext("qTabStore");
|
|
20
|
+
if (!hasContext("qTabStore")) {
|
|
14
21
|
console.warn("QTab should be used inside QTabs");
|
|
15
22
|
}
|
|
16
|
-
const
|
|
17
|
-
let indexContext = getContext("QTabCount");
|
|
23
|
+
const isInitallyActive = to !== void 0 ? isRouteActive($Quaff.router, to) : name === $qTabStore.value;
|
|
18
24
|
$:
|
|
19
|
-
if (
|
|
20
|
-
|
|
25
|
+
if (isInitallyActive && qTab) {
|
|
26
|
+
setActive(qTab);
|
|
21
27
|
}
|
|
22
|
-
let activeStore = getContext("activeTab");
|
|
23
28
|
$:
|
|
24
|
-
isActive =
|
|
29
|
+
isActive = name === $qTabStore.value;
|
|
25
30
|
$:
|
|
26
|
-
if (isActive && qTab) {
|
|
31
|
+
if (qTab && isActive && qTab !== $qTabStore.activeEl) {
|
|
27
32
|
setActive(qTab);
|
|
28
33
|
}
|
|
29
34
|
let tag;
|
|
30
35
|
$:
|
|
31
36
|
tag = to === void 0 ? "button" : "a";
|
|
32
|
-
$:
|
|
33
|
-
classes = createClasses([isActive && "active"], {
|
|
34
|
-
component: "q-tab",
|
|
35
|
-
userClasses
|
|
36
|
-
});
|
|
37
37
|
function setActive(el) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
}
|
|
38
|
+
const store = get(qTabStore);
|
|
39
|
+
const previousEl = store.activeEl;
|
|
40
|
+
const variant = store.variant;
|
|
41
|
+
const child = variant === "primary" ? el.firstElementChild : { offsetLeft: 0, offsetWidth: 0 };
|
|
42
|
+
const position = variant === "vertical" ? el.offsetTop : el.offsetLeft + child.offsetLeft;
|
|
43
|
+
const size = variant === "vertical" ? el.offsetHeight : child.offsetWidth || el.offsetWidth;
|
|
44
|
+
$qTabStore = {
|
|
45
|
+
variant,
|
|
46
|
+
value: name,
|
|
47
|
+
previousEl,
|
|
48
|
+
activeEl: el,
|
|
49
|
+
utils: {
|
|
50
|
+
size,
|
|
51
|
+
position
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
54
|
}
|
|
55
55
|
function onClick(e) {
|
|
56
|
-
|
|
56
|
+
if (!isActive) {
|
|
57
|
+
setActive(e.target);
|
|
58
|
+
}
|
|
57
59
|
}
|
|
58
60
|
function onKeydown(e) {
|
|
59
61
|
if (isActivationKey(e)) {
|
|
@@ -83,17 +85,22 @@ function onKeydown(e) {
|
|
|
83
85
|
</script>
|
|
84
86
|
|
|
85
87
|
<svelte:element
|
|
86
|
-
this={tag}
|
|
87
88
|
use:ripple
|
|
89
|
+
bind:this={qTab}
|
|
90
|
+
this={tag}
|
|
91
|
+
|
|
88
92
|
href={to}
|
|
89
|
-
class={classes}
|
|
90
93
|
role={tag === "a" ? "button" : undefined}
|
|
91
94
|
aria-current={isActive || undefined}
|
|
95
|
+
|
|
96
|
+
class="q-tab {userClasses}"
|
|
97
|
+
class:q-tab--active={isActive}
|
|
98
|
+
|
|
92
99
|
on:click
|
|
93
100
|
on:click={onClick}
|
|
94
101
|
on:keydown={onKeydown}
|
|
102
|
+
|
|
95
103
|
{...$$restProps}
|
|
96
|
-
bind:this={qTab}
|
|
97
104
|
>
|
|
98
105
|
<div>
|
|
99
106
|
{#if icon}
|
|
@@ -1,51 +1,70 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
<script context="module"></script>
|
|
2
|
+
|
|
3
|
+
<script>import { movementDirection } from "../../utils";
|
|
4
|
+
import { setContext } from "svelte";
|
|
5
|
+
import { writable } from "svelte/store";
|
|
6
|
+
export let value = void 0, variant = "primary", round = false, userClasses = "";
|
|
7
|
+
export { userClasses as class };
|
|
8
|
+
const cssVars = {
|
|
9
|
+
indicatorPosition: "--indicator-position",
|
|
10
|
+
indicatorSize: "--indicator-size"
|
|
11
|
+
};
|
|
12
|
+
let qTabs;
|
|
13
|
+
const qTabStore = writable({
|
|
14
|
+
value,
|
|
15
|
+
variant,
|
|
16
|
+
previousEl: null,
|
|
17
|
+
activeEl: null,
|
|
18
|
+
utils: { size: 0, position: 0 }
|
|
18
19
|
});
|
|
19
|
-
let activeTabStore = writable({ name: value, index: 0, size: 0, position: 0 });
|
|
20
20
|
$:
|
|
21
|
-
|
|
22
|
-
$
|
|
23
|
-
return $
|
|
21
|
+
qTabStore.update(($store) => {
|
|
22
|
+
$store.value = value;
|
|
23
|
+
return $store;
|
|
24
24
|
});
|
|
25
|
-
setContext("activeTab", activeTabStore);
|
|
26
|
-
setContext("variant", variant);
|
|
27
25
|
$:
|
|
28
|
-
value = $
|
|
26
|
+
value = $qTabStore.value;
|
|
27
|
+
setContext("qTabStore", qTabStore);
|
|
29
28
|
$:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
29
|
+
if ($qTabStore.activeEl) {
|
|
30
|
+
const {
|
|
31
|
+
previousEl,
|
|
32
|
+
activeEl,
|
|
33
|
+
utils: { position, size },
|
|
34
|
+
variant: storeVariant
|
|
35
|
+
} = $qTabStore;
|
|
36
|
+
const tabsSize = storeVariant === "vertical" ? qTabs.offsetHeight : qTabs.offsetWidth;
|
|
37
|
+
const tabSize = size / tabsSize;
|
|
38
|
+
if (!previousEl) {
|
|
39
|
+
qTabs.style.setProperty(cssVars.indicatorSize, `${tabSize}`);
|
|
40
|
+
qTabs.style.setProperty(cssVars.indicatorPosition, `${position}px`);
|
|
41
|
+
} else {
|
|
42
|
+
const comparePositions = movementDirection(previousEl, activeEl);
|
|
43
|
+
let transitionSize;
|
|
44
|
+
if (comparePositions === "next") {
|
|
45
|
+
transitionSize = prepareTransitionSize(storeVariant, previousEl, activeEl);
|
|
46
|
+
} else {
|
|
47
|
+
transitionSize = prepareTransitionSize(storeVariant, activeEl, previousEl);
|
|
48
|
+
qTabs.style.setProperty(cssVars.indicatorPosition, `${position}px`);
|
|
49
|
+
}
|
|
50
|
+
qTabs.style.setProperty(cssVars.indicatorSize, `${transitionSize / tabsSize}`);
|
|
51
|
+
setTimeout(() => {
|
|
52
|
+
qTabs.style.setProperty(cssVars.indicatorPosition, `${position}px`);
|
|
53
|
+
qTabs.style.setProperty(cssVars.indicatorSize, `${tabSize}`);
|
|
54
|
+
}, 250);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function prepareTransitionSize(storeVariant, fromEl, toEl) {
|
|
58
|
+
const fromElChild = storeVariant === "primary" ? fromEl.firstElementChild : { offsetLeft: 0, offsetWidth: 0 };
|
|
59
|
+
const toElChild = storeVariant === "primary" ? toEl.firstElementChild : { offsetLeft: 0, offsetWidth: 0 };
|
|
60
|
+
return storeVariant === "vertical" ? toEl.offsetTop + toEl.offsetHeight - fromEl.offsetTop : toEl.offsetLeft + toElChild.offsetLeft + (toElChild.offsetWidth || toEl.offsetWidth) - (fromEl.offsetLeft + fromElChild.offsetLeft);
|
|
61
|
+
}
|
|
47
62
|
</script>
|
|
48
63
|
|
|
49
|
-
<nav
|
|
64
|
+
<nav
|
|
65
|
+
bind:this={qTabs}
|
|
66
|
+
class="q-tabs q-tabs--{variant} {userClasses}"
|
|
67
|
+
class:q-tabs--rounded={round}
|
|
68
|
+
>
|
|
50
69
|
<slot />
|
|
51
70
|
</nav>
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
+
export type QTab = HTMLAnchorElement | HTMLButtonElement;
|
|
3
|
+
export type QTabStore = {
|
|
4
|
+
value?: string;
|
|
5
|
+
variant: QTabsProps["variant"];
|
|
6
|
+
previousEl: QTab | null;
|
|
7
|
+
activeEl: QTab | null;
|
|
8
|
+
utils: {
|
|
9
|
+
position: number;
|
|
10
|
+
size: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
2
13
|
import type { QTabsProps } from "./props";
|
|
3
14
|
declare const __propDef: {
|
|
4
15
|
props: {
|
|
@@ -6,7 +17,6 @@ declare const __propDef: {
|
|
|
6
17
|
variant?: QTabsProps["variant"];
|
|
7
18
|
round?: QTabsProps["round"];
|
|
8
19
|
class?: string | null | undefined;
|
|
9
|
-
style?: string | null | undefined;
|
|
10
20
|
};
|
|
11
21
|
events: {
|
|
12
22
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "../../utils
|
|
1
|
+
import type { QComponentDocs } from "../../utils";
|
|
2
2
|
export declare let QTabsDocs: QComponentDocs;
|
|
@@ -10,7 +10,7 @@ export const QTabsDocsProps = [
|
|
|
10
10
|
{
|
|
11
11
|
name: "variant",
|
|
12
12
|
type: "QTabsVariants",
|
|
13
|
-
optional:
|
|
13
|
+
optional: true,
|
|
14
14
|
clickableType: true,
|
|
15
15
|
description: "",
|
|
16
16
|
default: "",
|
|
@@ -18,7 +18,7 @@ export const QTabsDocsProps = [
|
|
|
18
18
|
{
|
|
19
19
|
name: "round",
|
|
20
20
|
type: "boolean",
|
|
21
|
-
optional:
|
|
21
|
+
optional: true,
|
|
22
22
|
clickableType: false,
|
|
23
23
|
description: "",
|
|
24
24
|
default: "",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
& > .q-tab {
|
|
16
16
|
position: relative;
|
|
17
17
|
box-sizing: border-box;
|
|
18
|
-
height:
|
|
18
|
+
min-height: 3rem;
|
|
19
19
|
min-width: max-content;
|
|
20
20
|
display: flex;
|
|
21
21
|
align-items: center;
|
|
@@ -59,7 +59,6 @@
|
|
|
59
59
|
|
|
60
60
|
&.q-tabs--vertical {
|
|
61
61
|
flex-direction: column;
|
|
62
|
-
min-height: calc(var(--tab-count) * 3rem);
|
|
63
62
|
width: fit-content;
|
|
64
63
|
align-items: stretch;
|
|
65
64
|
border-bottom: unset;
|
|
@@ -70,38 +69,48 @@
|
|
|
70
69
|
}
|
|
71
70
|
|
|
72
71
|
&::after {
|
|
73
|
-
top: var(--indicator-position);
|
|
74
|
-
right: 0;
|
|
75
|
-
bottom: auto;
|
|
76
72
|
left: auto;
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
right: 0;
|
|
74
|
+
top: 0;
|
|
75
|
+
bottom: 0;
|
|
76
|
+
|
|
77
|
+
width: 0.125rem;
|
|
78
|
+
height: 100%;
|
|
79
|
+
|
|
80
|
+
transform-origin: top;
|
|
81
|
+
|
|
82
|
+
scale: 1 var(--indicator-size, 0);
|
|
83
|
+
translate: 0 var(--indicator-position, 0);
|
|
79
84
|
}
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
&::after {
|
|
83
88
|
content: "";
|
|
84
89
|
position: absolute;
|
|
85
|
-
|
|
86
|
-
right:
|
|
90
|
+
left: 0;
|
|
91
|
+
right: 0;
|
|
87
92
|
bottom: 0;
|
|
88
|
-
|
|
89
|
-
width:
|
|
90
|
-
height:
|
|
93
|
+
|
|
94
|
+
width: 100%;
|
|
95
|
+
height: 0.125rem;
|
|
96
|
+
|
|
91
97
|
border-radius: 0;
|
|
92
98
|
background: var(--primary);
|
|
93
|
-
transition: all 0.3s cubic-bezier(0.77, 0, 0.18, 1);
|
|
94
|
-
opacity: 0;
|
|
95
|
-
}
|
|
96
99
|
|
|
97
|
-
|
|
98
|
-
|
|
100
|
+
transform-origin: left;
|
|
101
|
+
transition:
|
|
102
|
+
scale 0.2s cubic-bezier(0.25, 0.92, 0.33, 1),
|
|
103
|
+
translate 0.2s cubic-bezier(0.25, 0.92, 0.33, 1);
|
|
104
|
+
|
|
105
|
+
scale: var(--indicator-size, 0) 1;
|
|
106
|
+
translate: var(--indicator-position, 0) 0;
|
|
99
107
|
}
|
|
100
108
|
|
|
101
109
|
&.q-tabs--primary::after {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
110
|
+
translate: var(--indicator-position, 0) 0;
|
|
111
|
+
scale: var(--indicator-size, 0) 1;
|
|
112
|
+
|
|
113
|
+
height: 0.1875rem;
|
|
114
|
+
border-radius: 0.25rem 0.25rem 0px 0px;
|
|
106
115
|
}
|
|
107
116
|
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { type NativeProps } from "../../utils/types";
|
|
2
1
|
import type { HTMLAttributes } from "svelte/elements";
|
|
2
|
+
import type { NativeProps } from "../../utils";
|
|
3
3
|
export type QTabsVariants = "primary" | "secondary" | "vertical";
|
|
4
4
|
export interface QTabsProps extends NativeProps, HTMLAttributes<HTMLElement> {
|
|
5
5
|
value?: string;
|
|
6
6
|
variant?: QTabsVariants;
|
|
7
7
|
round?: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare const QTabsPropsDefaults: QTabsProps;
|
|
10
9
|
export interface QTabProps extends NativeProps, HTMLAttributes<HTMLElement> {
|
|
11
|
-
name
|
|
10
|
+
name: string;
|
|
12
11
|
to?: string;
|
|
13
12
|
icon?: string;
|
|
14
13
|
}
|
|
15
|
-
export declare const QTabPropsDefaults: QTabProps;
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export const QTabsPropsDefaults = {
|
|
3
|
-
value: undefined,
|
|
4
|
-
variant: "primary",
|
|
5
|
-
round: false,
|
|
6
|
-
...NativePropsDefaults,
|
|
7
|
-
};
|
|
8
|
-
export const QTabPropsDefaults = {
|
|
9
|
-
name: undefined,
|
|
10
|
-
to: undefined,
|
|
11
|
-
icon: undefined,
|
|
12
|
-
...NativePropsDefaults,
|
|
13
|
-
};
|
|
1
|
+
import "$lib/utils";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
<script>import { createClasses } from "../../utils
|
|
2
|
-
import { onMount } from "svelte";
|
|
1
|
+
<script>import { createClasses } from "../../utils";
|
|
3
2
|
export let value, icon = void 0, label = void 0, leftLabel = void 0, disable = void 0, userClasses = void 0;
|
|
4
3
|
export { userClasses as class };
|
|
5
4
|
$:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "../../utils
|
|
1
|
+
import type { QComponentDocs } from "../../utils";
|
|
2
2
|
export declare let QToggleDocs: QComponentDocs;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import {
|
|
1
|
+
<script>import { useSize } from "../../composables";
|
|
2
|
+
import { createClasses, createStyles } from "../../utils";
|
|
3
3
|
export let inset = false, border = false, elevate = false, height = "64px", userClasses = void 0, userStyles = void 0;
|
|
4
4
|
export { userClasses as class, userStyles as style };
|
|
5
5
|
$:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "../../utils
|
|
1
|
+
import type { QComponentDocs } from "../../utils";
|
|
2
2
|
export declare let QToolbarDocs: QComponentDocs;
|
|
@@ -2,27 +2,43 @@ export const QToolbarDocsProps = [
|
|
|
2
2
|
{
|
|
3
3
|
name: "inset",
|
|
4
4
|
type: "boolean",
|
|
5
|
-
optional:
|
|
5
|
+
optional: true,
|
|
6
6
|
clickableType: false,
|
|
7
7
|
description: "",
|
|
8
|
-
default: "",
|
|
8
|
+
default: "false",
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
|
-
name: "
|
|
12
|
-
type: "
|
|
13
|
-
optional:
|
|
11
|
+
name: "border",
|
|
12
|
+
type: "boolean",
|
|
13
|
+
optional: true,
|
|
14
14
|
clickableType: false,
|
|
15
15
|
description: "",
|
|
16
|
-
default: "",
|
|
16
|
+
default: "false",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "elevate",
|
|
20
|
+
type: "boolean",
|
|
21
|
+
optional: true,
|
|
22
|
+
clickableType: false,
|
|
23
|
+
description: "",
|
|
24
|
+
default: "false",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "height",
|
|
28
|
+
type: "CssValue | number",
|
|
29
|
+
optional: true,
|
|
30
|
+
clickableType: true,
|
|
31
|
+
description: "",
|
|
32
|
+
default: "64px",
|
|
17
33
|
},
|
|
18
34
|
];
|
|
19
35
|
export const QToolbarTitleDocsProps = [
|
|
20
36
|
{
|
|
21
37
|
name: "shrink",
|
|
22
38
|
type: "boolean",
|
|
23
|
-
optional:
|
|
39
|
+
optional: true,
|
|
24
40
|
clickableType: false,
|
|
25
41
|
description: "",
|
|
26
|
-
default: "",
|
|
42
|
+
default: "false",
|
|
27
43
|
},
|
|
28
44
|
];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "../../utils
|
|
1
|
+
import type { QComponentDocs } from "../../utils";
|
|
2
2
|
export declare let QTooltipDocs: QComponentDocs;
|
|
@@ -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 QTooltipProps extends NativeProps, HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
value?: boolean;
|
|
5
5
|
position?: "top" | "right" | "bottom" | "left";
|
|
@@ -11,7 +11,7 @@ const alignMap = {
|
|
|
11
11
|
// @todo - justify-stretch isn't possible
|
|
12
12
|
stretch: "stretch",
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export function useAlign(align = "top left") {
|
|
15
15
|
const alignments = align
|
|
16
16
|
.split(" ")
|
|
17
17
|
.map((entry) => {
|
|
@@ -8,7 +8,7 @@ export interface UseRouterLinkProps {
|
|
|
8
8
|
}
|
|
9
9
|
export declare const UseRouterLinkPropsDefaults: UseRouterLinkProps;
|
|
10
10
|
export declare function isRouteActive(router: Page<Record<string, string>, string | null>, to: string | undefined): boolean;
|
|
11
|
-
export
|
|
11
|
+
export declare function useRouterLink<T extends UseRouterLinkProps>(props: T): {
|
|
12
12
|
hasLink: boolean;
|
|
13
13
|
linkAttributes: {
|
|
14
14
|
href: string | undefined;
|