@quaffui/quaff 0.1.0-prealpha12 → 0.1.0-prealpha15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/avatar/QAvatar.svelte +37 -29
- package/dist/components/avatar/QAvatar.svelte.d.ts +0 -1
- package/dist/components/avatar/docs.d.ts +1 -1
- package/dist/components/avatar/docs.props.js +2 -0
- package/dist/components/avatar/props.d.ts +1 -1
- package/dist/components/breadcrumbs/QBreadcrumbs.svelte +3 -8
- package/dist/components/breadcrumbs/QBreadcrumbsEl.svelte +12 -20
- package/dist/components/breadcrumbs/docs.d.ts +1 -1
- package/dist/components/breadcrumbs/docs.props.js +2 -0
- package/dist/components/breadcrumbs/props.d.ts +1 -1
- package/dist/components/button/QBtn.svelte +23 -27
- package/dist/components/button/docs.d.ts +1 -1
- package/dist/components/button/docs.props.js +18 -0
- package/dist/components/button/props.d.ts +1 -1
- package/dist/components/card/QCard.svelte +8 -9
- package/dist/components/card/QCardActions.svelte +7 -11
- package/dist/components/card/QCardSection.svelte +7 -9
- package/dist/components/card/docs.d.ts +1 -1
- package/dist/components/card/docs.props.js +3 -1
- package/dist/components/card/props.d.ts +2 -2
- package/dist/components/checkbox/QCheckbox.svelte +6 -8
- package/dist/components/checkbox/docs.d.ts +1 -1
- package/dist/components/checkbox/docs.props.js +2 -0
- package/dist/components/checkbox/props.d.ts +1 -1
- package/dist/components/chip/QChip.svelte +39 -30
- package/dist/components/chip/QChip.svelte.d.ts +2 -1
- package/dist/components/chip/docs.d.ts +1 -1
- package/dist/components/chip/docs.props.js +10 -0
- package/dist/components/chip/index.scss +18 -1
- package/dist/components/chip/props.d.ts +6 -1
- package/dist/components/codeBlock/QCodeBlock.svelte +24 -22
- package/dist/components/codeBlock/QCodeBlock.svelte.d.ts +0 -1
- package/dist/components/codeBlock/docs.props.js +2 -0
- package/dist/components/dialog/QDialog.svelte +40 -49
- package/dist/components/dialog/QDialog.svelte.d.ts +6 -5
- package/dist/components/dialog/docs.d.ts +1 -1
- package/dist/components/dialog/docs.props.js +22 -4
- package/dist/components/dialog/index.scss +5 -4
- package/dist/components/dialog/props.d.ts +5 -5
- package/dist/components/drawer/QDrawer.svelte +3 -3
- package/dist/components/drawer/docs.d.ts +1 -1
- package/dist/components/drawer/docs.props.js +3 -1
- package/dist/components/drawer/props.d.ts +1 -1
- package/dist/components/footer/QFooter.svelte +3 -3
- package/dist/components/footer/docs.d.ts +1 -1
- package/dist/components/footer/docs.props.js +6 -4
- package/dist/components/footer/props.d.ts +1 -1
- package/dist/components/header/QHeader.svelte +2 -2
- package/dist/components/header/docs.props.d.ts +24 -0
- package/dist/components/header/docs.props.js +72 -0
- package/dist/components/icon/QIcon.svelte +10 -19
- package/dist/components/icon/QIcon.svelte.d.ts +0 -1
- package/dist/components/icon/docs.d.ts +1 -1
- package/dist/components/icon/docs.props.js +6 -4
- package/dist/components/icon/props.d.ts +1 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +2 -1
- package/dist/components/input/QInput.svelte +62 -73
- package/dist/components/input/QInput.svelte.d.ts +3 -2
- package/dist/components/input/docs.d.ts +1 -1
- package/dist/components/input/docs.js +1 -7
- package/dist/components/input/docs.props.js +7 -13
- package/dist/components/input/index.scss +1 -3
- package/dist/components/input/props.d.ts +1 -3
- package/dist/components/input/props.js +0 -1
- package/dist/components/layout/QLayout.svelte +6 -6
- package/dist/components/layout/QLayout.svelte.d.ts +2 -2
- package/dist/components/layout/docs.d.ts +1 -1
- package/dist/components/layout/docs.props.js +9 -7
- package/dist/components/layout/index.scss +2 -6
- package/dist/components/layout/props.d.ts +1 -1
- package/dist/components/list/QItem.svelte +29 -29
- package/dist/components/list/QItemSection.svelte +12 -15
- package/dist/components/list/QList.svelte +12 -13
- package/dist/components/list/docs.d.ts +1 -1
- package/dist/components/list/docs.props.js +45 -27
- package/dist/components/list/index.scss +1 -0
- package/dist/components/list/props.d.ts +1 -1
- package/dist/components/list/props.js +1 -1
- package/dist/components/private/QApi.svelte +2 -2
- package/dist/components/private/QApi.svelte.d.ts +1 -1
- package/dist/components/private/QDocs.svelte +2 -2
- package/dist/components/private/QDocs.svelte.d.ts +1 -1
- package/dist/components/private/QDocsSection.svelte +2 -3
- package/dist/components/progress/QCircularProgress.svelte +14 -11
- package/dist/components/progress/QLinearProgress.svelte +17 -23
- package/dist/components/progress/QLinearProgress.svelte.d.ts +0 -1
- package/dist/components/progress/docs.d.ts +1 -1
- package/dist/components/progress/docs.props.js +17 -15
- package/dist/components/progress/index.scss +20 -3
- package/dist/components/progress/props.d.ts +1 -1
- package/dist/components/radio/QRadio.svelte +2 -8
- package/dist/components/radio/docs.d.ts +1 -1
- package/dist/components/radio/docs.props.js +5 -3
- package/dist/components/radio/props.d.ts +1 -1
- package/dist/components/radio/props.js +1 -1
- package/dist/components/railbar/QRailbar.svelte +3 -3
- package/dist/components/railbar/docs.d.ts +1 -1
- package/dist/components/railbar/docs.props.js +9 -7
- package/dist/components/railbar/props.d.ts +1 -1
- package/dist/components/select/QSelect.svelte +87 -93
- package/dist/components/select/QSelect.svelte.d.ts +2 -1
- package/dist/components/select/docs.d.ts +1 -1
- package/dist/components/select/docs.js +1 -7
- package/dist/components/select/docs.props.js +6 -12
- package/dist/components/select/index.scss +17 -4
- package/dist/components/select/props.d.ts +1 -3
- package/dist/components/select/props.js +0 -1
- package/dist/components/separator/QSeparator.svelte +39 -50
- package/dist/components/separator/QSeparator.svelte.d.ts +0 -1
- package/dist/components/separator/docs.d.ts +1 -1
- package/dist/components/separator/docs.props.js +15 -13
- package/dist/components/separator/index.scss +52 -0
- package/dist/components/separator/props.d.ts +3 -3
- package/dist/components/table/QTable.svelte +8 -17
- package/dist/components/table/QTable.svelte.d.ts +1 -2
- package/dist/components/table/docs.d.ts +1 -1
- package/dist/components/table/docs.props.js +3 -1
- package/dist/components/table/props.d.ts +1 -1
- package/dist/components/tabs/QTab.svelte +50 -43
- package/dist/components/tabs/QTab.svelte.d.ts +1 -1
- package/dist/components/tabs/QTabs.svelte +61 -42
- package/dist/components/tabs/QTabs.svelte.d.ts +11 -1
- package/dist/components/tabs/docs.d.ts +1 -1
- package/dist/components/tabs/docs.props.js +5 -3
- package/dist/components/tabs/index.scss +30 -21
- package/dist/components/tabs/props.d.ts +2 -4
- package/dist/components/tabs/props.js +1 -13
- package/dist/components/toggle/QToggle.svelte +7 -16
- package/dist/components/toggle/docs.d.ts +1 -1
- package/dist/components/toggle/docs.props.js +2 -0
- package/dist/components/toggle/props.d.ts +1 -1
- package/dist/components/toggle/props.js +1 -1
- package/dist/components/toolbar/QToolbar.svelte +12 -16
- package/dist/components/toolbar/QToolbar.svelte.d.ts +0 -1
- package/dist/components/toolbar/QToolbarTitle.svelte +1 -1
- package/dist/components/toolbar/docs.d.ts +1 -1
- package/dist/components/toolbar/docs.props.js +26 -8
- package/dist/components/toolbar/props.d.ts +1 -1
- package/dist/components/tooltip/QTooltip.svelte +10 -8
- package/dist/components/tooltip/docs.d.ts +1 -1
- package/dist/components/tooltip/docs.props.js +3 -1
- package/dist/components/tooltip/index.scss +1 -0
- package/dist/components/tooltip/props.d.ts +1 -1
- package/dist/components/tooltip/props.js +1 -1
- package/dist/composables/index.d.ts +3 -0
- package/dist/composables/index.js +3 -1
- package/dist/composables/use-align.d.ts +1 -1
- package/dist/composables/use-align.js +1 -1
- package/dist/composables/use-router-link.d.ts +1 -1
- package/dist/composables/use-router-link.js +2 -2
- package/dist/composables/use-size.d.ts +1 -1
- package/dist/composables/use-size.js +2 -2
- package/dist/css/index.css +1 -1
- package/dist/css/index.scss +1 -0
- package/dist/css/mixins/field-mixins.scss +53 -0
- package/dist/css/mixins.scss +5 -4
- package/dist/css/ripple.scss +8 -1
- package/dist/css/shared/q-field.scss +318 -0
- package/dist/css/theme/colors.module.scss +261 -109
- package/dist/css/theme/palette.scss +8 -2
- package/dist/helpers/index.d.ts +1 -1
- package/dist/helpers/index.js +1 -1
- package/dist/helpers/ripple.js +12 -10
- package/dist/helpers/version.d.ts +1 -1
- package/dist/helpers/version.js +1 -1
- package/dist/stores/QTheme.d.ts +8 -7
- package/dist/stores/QTheme.js +3 -3
- package/dist/stores/Quaff.js +1 -1
- package/dist/stores/index.d.ts +2 -0
- package/dist/stores/index.js +2 -0
- package/dist/utils/clipboard.d.ts +1 -1
- package/dist/utils/clipboard.js +1 -2
- package/dist/utils/dom.d.ts +1 -0
- package/dist/utils/dom.js +4 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +8 -1
- package/dist/utils/props.d.ts +1 -1
- package/dist/utils/types.d.ts +1 -1
- package/dist/utils/types.json +24 -1
- package/package.json +23 -24
- package/dist/composables/use-index.d.ts +0 -2
- package/dist/composables/use-index.js +0 -17
- package/dist/css/mixins/field.scss +0 -432
- package/dist/helpers/activationHandler.d.ts +0 -9
- package/dist/helpers/activationHandler.js +0 -23
- package/dist/utils/fields.d.ts +0 -1
- package/dist/utils/fields.js +0 -14
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
// AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
|
|
2
|
+
// @quaffHash 587610290cf9d959dd89496d6b94a98e
|
|
1
3
|
export const QIconDocsProps = [
|
|
2
4
|
{
|
|
3
5
|
name: "size",
|
|
4
6
|
type: "QIconSizeOptions",
|
|
5
|
-
optional:
|
|
7
|
+
optional: true,
|
|
6
8
|
clickableType: true,
|
|
7
9
|
description: 'The size of the icon. Can be specified with CSS units. If no unit is specified, "px" will be used.',
|
|
8
10
|
default: "md",
|
|
@@ -10,7 +12,7 @@ export const QIconDocsProps = [
|
|
|
10
12
|
{
|
|
11
13
|
name: "type",
|
|
12
14
|
type: "QIconTypeOptions",
|
|
13
|
-
optional:
|
|
15
|
+
optional: true,
|
|
14
16
|
clickableType: true,
|
|
15
17
|
description: "The type of the icon.",
|
|
16
18
|
default: "outlined",
|
|
@@ -26,7 +28,7 @@ export const QIconDocsProps = [
|
|
|
26
28
|
{
|
|
27
29
|
name: "filled",
|
|
28
30
|
type: "boolean",
|
|
29
|
-
optional:
|
|
31
|
+
optional: true,
|
|
30
32
|
clickableType: false,
|
|
31
33
|
description: "Determines whether the icon should be filled.",
|
|
32
34
|
default: "false",
|
|
@@ -50,7 +52,7 @@ export const QIconDocsProps = [
|
|
|
50
52
|
{
|
|
51
53
|
name: "imgAttributes",
|
|
52
54
|
type: "Record<string, any>",
|
|
53
|
-
optional:
|
|
55
|
+
optional: true,
|
|
54
56
|
clickableType: true,
|
|
55
57
|
description: 'Additional attributes for the image element when using the `img` prop, as for example the "alt" attribute.',
|
|
56
58
|
default: "{}",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CssValue, NativeProps, QuaffSizes } from "../../utils
|
|
1
|
+
import type { CssValue, NativeProps, QuaffSizes } from "../../utils";
|
|
2
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
3
3
|
export type QIconSizeOptions = QuaffSizes | CssValue | number;
|
|
4
4
|
export type QIconTypeOptions = "outlined" | "sharp" | "rounded";
|
|
@@ -5,6 +5,7 @@ import QCardSection from "./card/QCardSection.svelte";
|
|
|
5
5
|
import QCardActions from "./card/QCardActions.svelte";
|
|
6
6
|
import QCheckbox from "./checkbox/QCheckbox.svelte";
|
|
7
7
|
import QChip from "./chip/QChip.svelte";
|
|
8
|
+
import QCircularProgress from "./progress/QCircularProgress.svelte";
|
|
8
9
|
import QCodeBlock from "./codeBlock/QCodeBlock.svelte";
|
|
9
10
|
import QDialog from "./dialog/QDialog.svelte";
|
|
10
11
|
import QDrawer from "./drawer/QDrawer.svelte";
|
|
@@ -28,4 +29,4 @@ import QToggle from "./toggle/QToggle.svelte";
|
|
|
28
29
|
import QToolbar from "./toolbar/QToolbar.svelte";
|
|
29
30
|
import QToolbarTitle from "./toolbar/QToolbarTitle.svelte";
|
|
30
31
|
import QTooltip from "./tooltip/QTooltip.svelte";
|
|
31
|
-
export { QAvatar, QBtn, QCard, QCardSection, QCardActions, QCheckbox, QChip, QCodeBlock, QDialog, QDrawer, QFooter, QHeader, QIcon, QInput, QSelect, QLayout, QList, QItem, QItemSection, QLinearProgress, QRadio, QRailbar, QSeparator, QTabs, QTab, QTable, QToggle, QToolbar, QToolbarTitle, QTooltip, };
|
|
32
|
+
export { QAvatar, QBtn, QCard, QCardSection, QCardActions, QCheckbox, QChip, QCircularProgress, QCodeBlock, QDialog, QDrawer, QFooter, QHeader, QIcon, QInput, QSelect, QLayout, QList, QItem, QItemSection, QLinearProgress, QRadio, QRailbar, QSeparator, QTabs, QTab, QTable, QToggle, QToolbar, QToolbarTitle, QTooltip, };
|
package/dist/components/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import QCardSection from "./card/QCardSection.svelte";
|
|
|
5
5
|
import QCardActions from "./card/QCardActions.svelte";
|
|
6
6
|
import QCheckbox from "./checkbox/QCheckbox.svelte";
|
|
7
7
|
import QChip from "./chip/QChip.svelte";
|
|
8
|
+
import QCircularProgress from "./progress/QCircularProgress.svelte";
|
|
8
9
|
import QCodeBlock from "./codeBlock/QCodeBlock.svelte";
|
|
9
10
|
import QDialog from "./dialog/QDialog.svelte";
|
|
10
11
|
import QDrawer from "./drawer/QDrawer.svelte";
|
|
@@ -28,4 +29,4 @@ import QToggle from "./toggle/QToggle.svelte";
|
|
|
28
29
|
import QToolbar from "./toolbar/QToolbar.svelte";
|
|
29
30
|
import QToolbarTitle from "./toolbar/QToolbarTitle.svelte";
|
|
30
31
|
import QTooltip from "./tooltip/QTooltip.svelte";
|
|
31
|
-
export { QAvatar, QBtn, QCard, QCardSection, QCardActions, QCheckbox, QChip, QCodeBlock, QDialog, QDrawer, QFooter, QHeader, QIcon, QInput, QSelect, QLayout, QList, QItem, QItemSection, QLinearProgress, QRadio, QRailbar, QSeparator, QTabs, QTab, QTable, QToggle, QToolbar, QToolbarTitle, QTooltip, };
|
|
32
|
+
export { QAvatar, QBtn, QCard, QCardSection, QCardActions, QCheckbox, QChip, QCircularProgress, QCodeBlock, QDialog, QDrawer, QFooter, QHeader, QIcon, QInput, QSelect, QLayout, QList, QItem, QItemSection, QLinearProgress, QRadio, QRailbar, QSeparator, QTabs, QTab, QTable, QToggle, QToolbar, QToolbarTitle, QTooltip, };
|
|
@@ -1,81 +1,70 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { textWidth } from "../../utils/fields";
|
|
3
|
-
export let bordered = false, dense = false, disable = false, error = false, errorMessage = void 0, filled = false, hint = void 0, label = void 0, outlined = false, rounded = false, value, userClasses = void 0;
|
|
4
|
-
export { userClasses as class };
|
|
5
|
-
let active = false;
|
|
6
|
-
$:
|
|
7
|
-
hasBorder = bordered || rounded || outlined;
|
|
1
|
+
<script>let focus = false;
|
|
8
2
|
$:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
dense && "dense",
|
|
14
|
-
$$slots.prepend && "prepend",
|
|
15
|
-
$$slots.append && "append",
|
|
16
|
-
hasBorder && "has-border",
|
|
17
|
-
bordered && "bordered",
|
|
18
|
-
rounded && "rounded",
|
|
19
|
-
filled && "filled",
|
|
20
|
-
error && "error",
|
|
21
|
-
disable && "disabled"
|
|
22
|
-
],
|
|
23
|
-
{
|
|
24
|
-
component: "q-input",
|
|
25
|
-
userClasses
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
let wrapper = null;
|
|
29
|
-
let inputElement = null;
|
|
30
|
-
$:
|
|
31
|
-
value && updateInput(inputElement);
|
|
32
|
-
function updateInput(target) {
|
|
33
|
-
const input = target;
|
|
34
|
-
if (!wrapper) {
|
|
35
|
-
throw new Error("unexpected to not have element");
|
|
36
|
-
}
|
|
37
|
-
const label2 = wrapper.querySelector("label");
|
|
38
|
-
const isBorder = hasBorder && !filled;
|
|
39
|
-
const toActive = document.activeElement === target || input.value || input.querySelector("[selected]");
|
|
40
|
-
if (toActive) {
|
|
41
|
-
if (isBorder && label2) {
|
|
42
|
-
const labelWidth = textWidth(label2, "0.75rem Arial");
|
|
43
|
-
let width = active ? labelWidth : Math.round(labelWidth / 1.33);
|
|
44
|
-
width = width / 16;
|
|
45
|
-
const start = rounded ? 1.25 : 0.75;
|
|
46
|
-
const end = width + start + 0.5;
|
|
47
|
-
input.style.clipPath = `polygon(0% 0%, ${start}rem 0%, ${start}rem 0.5rem, ${end}rem 0.5rem, ${end}rem 0%, 100% 0%, 100% 100%, 0% 100%)`;
|
|
48
|
-
} else
|
|
49
|
-
input.style.clipPath = "";
|
|
50
|
-
active = true;
|
|
51
|
-
} else {
|
|
52
|
-
active = false;
|
|
53
|
-
input.style.clipPath = "";
|
|
54
|
-
}
|
|
55
|
-
}
|
|
3
|
+
active = value || focus;
|
|
4
|
+
let slotPrependWidth = 0;
|
|
5
|
+
export let dense = false, disable = false, error = false, errorMessage = void 0, filled = false, hint = void 0, label = void 0, outlined = false, rounded = false, value, userClasses = "";
|
|
6
|
+
export { userClasses as class };
|
|
56
7
|
</script>
|
|
57
8
|
|
|
58
|
-
<div
|
|
59
|
-
|
|
9
|
+
<div
|
|
10
|
+
class="q-input q-field {userClasses}"
|
|
11
|
+
class:q-field--default={!outlined && !rounded && !filled}
|
|
12
|
+
class:q-field--outlined={outlined}
|
|
13
|
+
class:q-field--rounded={rounded}
|
|
14
|
+
class:q-field--filled={filled}
|
|
15
|
+
class:q-field--has-border={outlined || rounded}
|
|
16
|
+
class:q-field--dense={dense}
|
|
17
|
+
class:q-field--active={active}
|
|
18
|
+
class:q-field--focus={focus}
|
|
19
|
+
class:q-field--label={label}
|
|
20
|
+
class:q-field--slot-append={$$slots.append}
|
|
21
|
+
class:q-field--slot-prepend={$$slots.prepend}
|
|
22
|
+
class:q-field--disable={disable}
|
|
23
|
+
class:q-field--error={error}
|
|
24
|
+
style:--slot-prepend-width="{slotPrependWidth}px"
|
|
25
|
+
{...$$restProps}
|
|
26
|
+
>
|
|
27
|
+
{#if $$slots.before}
|
|
28
|
+
<div class="q-field__slot-before">
|
|
29
|
+
<slot name="before" />
|
|
30
|
+
</div>
|
|
31
|
+
{/if}
|
|
60
32
|
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
33
|
+
<div class="q-field__inner">
|
|
34
|
+
<label class="q-field__wrapper">
|
|
35
|
+
{#if $$slots.prepend}
|
|
36
|
+
<div class="q-field__slot-prepend" bind:clientWidth={slotPrependWidth}>
|
|
37
|
+
<slot name="prepend" />
|
|
38
|
+
</div>
|
|
39
|
+
{/if}
|
|
40
|
+
<input
|
|
41
|
+
class="q-field__input"
|
|
42
|
+
bind:value
|
|
43
|
+
placeholder=""
|
|
44
|
+
on:focus={() => (focus = true)}
|
|
45
|
+
on:blur={() => (focus = false)}
|
|
46
|
+
disabled={disable}
|
|
47
|
+
tabindex={disable === true ? -1 : 0}
|
|
48
|
+
/>
|
|
49
|
+
<span class="q-field__label">{label}</span>
|
|
69
50
|
|
|
70
|
-
|
|
51
|
+
{#if $$slots.append}
|
|
52
|
+
<div class="q-field__slot-append">
|
|
53
|
+
<slot name="append" />
|
|
54
|
+
</div>
|
|
55
|
+
{/if}
|
|
56
|
+
</label>
|
|
71
57
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
58
|
+
{#if error && errorMessage}
|
|
59
|
+
<div class="q-field__error">{errorMessage}</div>
|
|
60
|
+
{:else if hint}
|
|
61
|
+
<div class="q-field__hint">{hint}</div>
|
|
62
|
+
{/if}
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
{#if $$slots.after}
|
|
66
|
+
<div class="q-field__slot-after">
|
|
67
|
+
<slot name="after" />
|
|
68
|
+
</div>
|
|
80
69
|
{/if}
|
|
81
70
|
</div>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type { QInputProps } from "
|
|
2
|
+
import type { QInputProps } from "../input/props";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
|
-
bordered?: QInputProps["bordered"];
|
|
7
6
|
dense?: QInputProps["dense"];
|
|
8
7
|
disable?: QInputProps["disable"];
|
|
9
8
|
error?: QInputProps["error"];
|
|
@@ -20,8 +19,10 @@ declare const __propDef: {
|
|
|
20
19
|
[evt: string]: CustomEvent<any>;
|
|
21
20
|
};
|
|
22
21
|
slots: {
|
|
22
|
+
before: {};
|
|
23
23
|
prepend: {};
|
|
24
24
|
append: {};
|
|
25
|
+
after: {};
|
|
25
26
|
};
|
|
26
27
|
};
|
|
27
28
|
type QInputProps_ = typeof __propDef.props;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "../../utils
|
|
1
|
+
import type { QComponentDocs } from "../../utils";
|
|
2
2
|
export declare let QInputDocs: QComponentDocs;
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
export let QInputDocs = {
|
|
2
2
|
name: "QInput",
|
|
3
|
-
description: "QInput is a form component that allows users to input text. It supports different visual styles such as
|
|
3
|
+
description: "QInput is a form component that allows users to input text. It supports different visual styles such as filled, outlined, and rounded, and it can also display hint text and custom error messages.",
|
|
4
4
|
docs: {
|
|
5
5
|
props: [
|
|
6
|
-
{
|
|
7
|
-
name: "bordered",
|
|
8
|
-
type: "boolean",
|
|
9
|
-
default: false,
|
|
10
|
-
description: "Whether the input component has a border.",
|
|
11
|
-
},
|
|
12
6
|
{
|
|
13
7
|
name: "disable",
|
|
14
8
|
type: "boolean",
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
+
// AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
|
|
2
|
+
// @quaffHash 901937b41d79099a96a3713827911b68
|
|
1
3
|
export const QInputDocsProps = [
|
|
2
|
-
{
|
|
3
|
-
name: "bordered",
|
|
4
|
-
type: "boolean",
|
|
5
|
-
optional: false,
|
|
6
|
-
clickableType: false,
|
|
7
|
-
description: "",
|
|
8
|
-
default: "",
|
|
9
|
-
},
|
|
10
4
|
{
|
|
11
5
|
name: "dense",
|
|
12
6
|
type: "boolean",
|
|
@@ -18,7 +12,7 @@ export const QInputDocsProps = [
|
|
|
18
12
|
{
|
|
19
13
|
name: "disable",
|
|
20
14
|
type: "boolean",
|
|
21
|
-
optional:
|
|
15
|
+
optional: true,
|
|
22
16
|
clickableType: false,
|
|
23
17
|
description: "",
|
|
24
18
|
default: "",
|
|
@@ -26,7 +20,7 @@ export const QInputDocsProps = [
|
|
|
26
20
|
{
|
|
27
21
|
name: "error",
|
|
28
22
|
type: "boolean",
|
|
29
|
-
optional:
|
|
23
|
+
optional: true,
|
|
30
24
|
clickableType: false,
|
|
31
25
|
description: "",
|
|
32
26
|
default: "",
|
|
@@ -42,7 +36,7 @@ export const QInputDocsProps = [
|
|
|
42
36
|
{
|
|
43
37
|
name: "filled",
|
|
44
38
|
type: "boolean",
|
|
45
|
-
optional:
|
|
39
|
+
optional: true,
|
|
46
40
|
clickableType: false,
|
|
47
41
|
description: "",
|
|
48
42
|
default: "",
|
|
@@ -66,7 +60,7 @@ export const QInputDocsProps = [
|
|
|
66
60
|
{
|
|
67
61
|
name: "outlined",
|
|
68
62
|
type: "boolean",
|
|
69
|
-
optional:
|
|
63
|
+
optional: true,
|
|
70
64
|
clickableType: false,
|
|
71
65
|
description: "",
|
|
72
66
|
default: "",
|
|
@@ -74,7 +68,7 @@ export const QInputDocsProps = [
|
|
|
74
68
|
{
|
|
75
69
|
name: "rounded",
|
|
76
70
|
type: "boolean",
|
|
77
|
-
optional:
|
|
71
|
+
optional: true,
|
|
78
72
|
clickableType: false,
|
|
79
73
|
description: "",
|
|
80
74
|
default: "",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { NativeProps } from "../../utils
|
|
1
|
+
import type { NativeProps } from "../../utils";
|
|
2
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
3
3
|
export interface QInputProps extends NativeProps, HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
bordered?: boolean;
|
|
5
4
|
dense?: boolean;
|
|
6
5
|
disable?: boolean;
|
|
7
6
|
error?: boolean;
|
|
@@ -14,7 +13,6 @@ export interface QInputProps extends NativeProps, HTMLAttributes<HTMLDivElement>
|
|
|
14
13
|
value: string;
|
|
15
14
|
}
|
|
16
15
|
export declare const QInputPropsDefaults: {
|
|
17
|
-
bordered: boolean;
|
|
18
16
|
dense: boolean;
|
|
19
17
|
disable: boolean;
|
|
20
18
|
error: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<script context="module"
|
|
2
|
-
|
|
3
|
-
<script>import { setContext } from "svelte";
|
|
4
|
-
import { createClasses, createStyles } from "../../utils/props";
|
|
5
|
-
import ContextReseter from "../private/ContextReseter.svelte";
|
|
1
|
+
<script context="module">import { createStyles, createClasses } from "../../utils";
|
|
2
|
+
import { setContext } from "svelte";
|
|
6
3
|
import { writable } from "svelte/store";
|
|
7
|
-
|
|
4
|
+
import ContextReseter from "../private/ContextReseter.svelte";
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<script>export let view = "hhh lpr fff", headerHeight = "64px", footerHeight = "80px", leftDrawerWidth = "300px", rightDrawerWidth = "300px", leftRailbarWidth = "88px", rightRailbarWidth = "88px", userClasses = void 0, userStyles = void 0;
|
|
8
8
|
export { userClasses as class, userStyles as style };
|
|
9
9
|
$:
|
|
10
10
|
style = createStyles(
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { QLayoutProps } from "./props";
|
|
3
|
+
import type { Readable } from "svelte/store";
|
|
2
4
|
export interface DrawerContext {
|
|
3
5
|
offset: {
|
|
4
6
|
top: boolean;
|
|
@@ -19,8 +21,6 @@ export type LayoutContext = Readable<{
|
|
|
19
21
|
drawerLeft: DrawerContext;
|
|
20
22
|
drawerRight: DrawerContext;
|
|
21
23
|
}>;
|
|
22
|
-
import type { QLayoutProps } from "./props";
|
|
23
|
-
import type { Readable } from "svelte/store";
|
|
24
24
|
declare const __propDef: {
|
|
25
25
|
props: {
|
|
26
26
|
[x: string]: any;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "../../utils
|
|
1
|
+
import type { QComponentDocs } from "../../utils";
|
|
2
2
|
export declare let QLayoutDocs: QComponentDocs;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
// AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
|
|
2
|
+
// @quaffHash cce7c92a645afcabe17eef05e3f16990
|
|
1
3
|
export const QLayoutDocsProps = [
|
|
2
4
|
{
|
|
3
5
|
name: "view",
|
|
4
6
|
type: "QLayoutViewOptions",
|
|
5
|
-
optional:
|
|
7
|
+
optional: true,
|
|
6
8
|
clickableType: true,
|
|
7
9
|
description: 'The layout view configuration, which defines how layout components (header, railbars, drawers, footer) should be displayed on screen.\nSee <a href="https://quasar.dev/layout/layout/#understanding-the-view-prop" target="_blank">Quasar\'s explanation on the view prop</a>.',
|
|
8
10
|
default: '"hhh lpr fff"',
|
|
@@ -10,7 +12,7 @@ export const QLayoutDocsProps = [
|
|
|
10
12
|
{
|
|
11
13
|
name: "headerHeight",
|
|
12
14
|
type: "string | number",
|
|
13
|
-
optional:
|
|
15
|
+
optional: true,
|
|
14
16
|
clickableType: false,
|
|
15
17
|
description: 'The height of the header. Can be specified with CSS units. If no unit is specified, "px" will be used.',
|
|
16
18
|
default: "64px",
|
|
@@ -18,7 +20,7 @@ export const QLayoutDocsProps = [
|
|
|
18
20
|
{
|
|
19
21
|
name: "footerHeight",
|
|
20
22
|
type: "string | number",
|
|
21
|
-
optional:
|
|
23
|
+
optional: true,
|
|
22
24
|
clickableType: false,
|
|
23
25
|
description: 'The height of the footer. Can be specified with CSS units. If no unit is specified, "px" will be used.',
|
|
24
26
|
default: "80px",
|
|
@@ -26,7 +28,7 @@ export const QLayoutDocsProps = [
|
|
|
26
28
|
{
|
|
27
29
|
name: "leftDrawerWidth",
|
|
28
30
|
type: "string | number",
|
|
29
|
-
optional:
|
|
31
|
+
optional: true,
|
|
30
32
|
clickableType: false,
|
|
31
33
|
description: 'The width of the left drawer. Can be specified with CSS units. If no unit is specified, "px" will be used.',
|
|
32
34
|
default: "300px",
|
|
@@ -34,7 +36,7 @@ export const QLayoutDocsProps = [
|
|
|
34
36
|
{
|
|
35
37
|
name: "rightDrawerWidth",
|
|
36
38
|
type: "string | number",
|
|
37
|
-
optional:
|
|
39
|
+
optional: true,
|
|
38
40
|
clickableType: false,
|
|
39
41
|
description: 'The width of the right drawer. Can be specified with CSS units. If no unit is specified, "px" will be used.',
|
|
40
42
|
default: "300px",
|
|
@@ -42,7 +44,7 @@ export const QLayoutDocsProps = [
|
|
|
42
44
|
{
|
|
43
45
|
name: "leftRailbarWidth",
|
|
44
46
|
type: "string | number",
|
|
45
|
-
optional:
|
|
47
|
+
optional: true,
|
|
46
48
|
clickableType: false,
|
|
47
49
|
description: 'The width of the left railbar. Can be specified with CSS units. If no unit is specified, "px" will be used.',
|
|
48
50
|
default: "88px",
|
|
@@ -50,7 +52,7 @@ export const QLayoutDocsProps = [
|
|
|
50
52
|
{
|
|
51
53
|
name: "rightRailbarWidth",
|
|
52
54
|
type: "string | number",
|
|
53
|
-
optional:
|
|
55
|
+
optional: true,
|
|
54
56
|
clickableType: false,
|
|
55
57
|
description: 'The width of the right railbar. Can be specified with CSS units. If no unit is specified, "px" will be used.',
|
|
56
58
|
default: "88px",
|
|
@@ -175,6 +175,7 @@ $contentSlot: ":not(.q-header, .q-footer, .q-railbar, .q-drawer)";
|
|
|
175
175
|
|
|
176
176
|
& .q-list > .q-item.q-link {
|
|
177
177
|
border-radius: 2rem;
|
|
178
|
+
overflow: hidden;
|
|
178
179
|
|
|
179
180
|
&::before {
|
|
180
181
|
content: "";
|
|
@@ -193,7 +194,7 @@ $contentSlot: ":not(.q-header, .q-footer, .q-railbar, .q-drawer)";
|
|
|
193
194
|
transition-timing-function: linear;
|
|
194
195
|
}
|
|
195
196
|
|
|
196
|
-
&.active {
|
|
197
|
+
&.q-item--active {
|
|
197
198
|
color: var(--on-secondary-container);
|
|
198
199
|
|
|
199
200
|
&::before {
|
|
@@ -201,11 +202,6 @@ $contentSlot: ":not(.q-header, .q-footer, .q-railbar, .q-drawer)";
|
|
|
201
202
|
transform: scaleX(1);
|
|
202
203
|
}
|
|
203
204
|
}
|
|
204
|
-
|
|
205
|
-
&:hover {
|
|
206
|
-
background-color: var(--on-surface-variant-2);
|
|
207
|
-
font-variation-settings: "GRAD" 50;
|
|
208
|
-
}
|
|
209
205
|
}
|
|
210
206
|
}
|
|
211
207
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NativeProps } from "../../utils
|
|
1
|
+
import type { NativeProps } from "../../utils";
|
|
2
2
|
import type { HTMLAttributes } from "svelte/elements";
|
|
3
3
|
export type QLayoutViewOptions = `${"l" | "h"}${"h" | "H"}${"r" | "h"} ${"l" | "L"}${"p"}${"r" | "R"} ${"l" | "f"}${"f" | "F"}${"r" | "f"}`;
|
|
4
4
|
export interface QLayoutProps extends NativeProps, HTMLAttributes<HTMLDivElement> {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import
|
|
3
|
-
import { createClasses } from "../../utils/props";
|
|
4
|
-
import { getContext, setContext } from "svelte";
|
|
1
|
+
<script>import { useRouterLink, isRouteActive } from "../../composables";
|
|
2
|
+
import { ripple } from "../../helpers";
|
|
5
3
|
import { Quaff } from "../../stores/Quaff";
|
|
4
|
+
import { setContext, getContext } from "svelte";
|
|
6
5
|
import { writable } from "svelte/store";
|
|
7
|
-
import {
|
|
8
|
-
export let tag = "div", active = false, clickable = false, dense = false, tabindex = 0, href = void 0, to = void 0, disable = false, activeClass =
|
|
6
|
+
import { QSeparator } from "../..";
|
|
7
|
+
export let tag = "div", active = false, clickable = false, dense = false, tabindex = 0, href = void 0, to = void 0, disable = false, activeClass = "", replace = false, noRipple = false, userClasses = "";
|
|
9
8
|
export { userClasses as class };
|
|
10
9
|
let hasMultipleLines = writable(false);
|
|
11
10
|
setContext("hasMultipleLines", hasMultipleLines);
|
|
@@ -25,27 +24,6 @@ $:
|
|
|
25
24
|
isClickable = isActionable && !disable;
|
|
26
25
|
$:
|
|
27
26
|
isActive = isRouteActive($Quaff.router, to);
|
|
28
|
-
$:
|
|
29
|
-
classes = createClasses(
|
|
30
|
-
[
|
|
31
|
-
$hasMultipleLines && "multiline",
|
|
32
|
-
dense && "dense",
|
|
33
|
-
(isActive || hasLink && active) && activeClass,
|
|
34
|
-
(isActive || hasLink && active) && "active"
|
|
35
|
-
],
|
|
36
|
-
{
|
|
37
|
-
component: "q-item",
|
|
38
|
-
quaffClasses: [linkClasses],
|
|
39
|
-
userClasses
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
$:
|
|
43
|
-
attributes = {
|
|
44
|
-
class: classes,
|
|
45
|
-
tabindex: isClickable == true ? Number(tabindex) || 0 : void 0,
|
|
46
|
-
"aria-disabled": isActionable === true && disable === true ? true : void 0,
|
|
47
|
-
...$$restProps
|
|
48
|
-
};
|
|
49
27
|
</script>
|
|
50
28
|
|
|
51
29
|
{#if separatorOptions !== undefined}
|
|
@@ -53,11 +31,33 @@ $:
|
|
|
53
31
|
{/if}
|
|
54
32
|
{#if linkAttributes.href !== undefined}
|
|
55
33
|
<!-- svelte-ignore a11y-missing-attribute -->
|
|
56
|
-
|
|
34
|
+
<!-- svelte-ignore a11y-no-noninteractive-tabindex -->
|
|
35
|
+
<a
|
|
36
|
+
use:ripple={{ disable: !isClickable || noRipple }}
|
|
37
|
+
class="q-item {linkClasses} {userClasses}"
|
|
38
|
+
class:q-item--active={isActive || (hasLink && active)}
|
|
39
|
+
class:q-item--multiline={$hasMultipleLines}
|
|
40
|
+
class:q-item--dense={dense}
|
|
41
|
+
class:{activeClass}={isActive || (hasLink && active)}
|
|
42
|
+
tabindex={isClickable ? Number(tabindex) || 0 : -1}
|
|
43
|
+
aria-disabled={(isActionable && disable) || undefined}
|
|
44
|
+
{...linkAttributes}
|
|
45
|
+
{...$$restProps}
|
|
46
|
+
>
|
|
57
47
|
<slot />
|
|
58
48
|
</a>
|
|
59
49
|
{:else}
|
|
60
|
-
<svelte:element
|
|
50
|
+
<svelte:element
|
|
51
|
+
this={tag}
|
|
52
|
+
class="q-item {userClasses}"
|
|
53
|
+
class:q-item--active={isActive || (hasLink && active)}
|
|
54
|
+
class:q-item--multiline={$hasMultipleLines}
|
|
55
|
+
class:q-item--dense={dense}
|
|
56
|
+
class:{activeClass}={isActive || (hasLink && active)}
|
|
57
|
+
tabindex={isClickable ? Number(tabindex) || 0 : -1}
|
|
58
|
+
aria-disabled={(isActionable && disable) || undefined}
|
|
59
|
+
{...$$restProps}
|
|
60
|
+
>
|
|
61
61
|
<slot />
|
|
62
62
|
</svelte:element>
|
|
63
63
|
{/if}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
|
|
3
|
-
export let type = "content", userClasses = void 0;
|
|
1
|
+
<script>import { getContext } from "svelte";
|
|
2
|
+
export let type = "content", userClasses = "";
|
|
4
3
|
export { userClasses as class };
|
|
5
4
|
$:
|
|
6
5
|
ctx = getContext("hasMultipleLines");
|
|
@@ -8,41 +7,39 @@ $:
|
|
|
8
7
|
if (type === "content") {
|
|
9
8
|
$ctx = $$slots.headline && [$$slots.line1, $$slots.line2, $$slots.line3].filter(Boolean).length >= 2;
|
|
10
9
|
}
|
|
11
|
-
$:
|
|
12
|
-
classes = createClasses([type], {
|
|
13
|
-
component: "q-item__section",
|
|
14
|
-
userClasses
|
|
15
|
-
});
|
|
16
10
|
</script>
|
|
17
11
|
|
|
18
|
-
<div
|
|
12
|
+
<div
|
|
13
|
+
class="q-item__section q-item__section--{type} {userClasses}"
|
|
14
|
+
{...$$restProps}
|
|
15
|
+
>
|
|
19
16
|
{#if type === "content"}
|
|
20
|
-
{#if [$$slots.headline, $$slots.line2, $$slots.line2, $$slots.line3].
|
|
17
|
+
{#if ![$$slots.headline, $$slots.line2, $$slots.line2, $$slots.line3].some(Boolean)}
|
|
21
18
|
<slot />
|
|
22
19
|
{:else}
|
|
23
20
|
{#if $$slots.headline}
|
|
24
|
-
<div class="body-large on-surface
|
|
21
|
+
<div class="body-large text-on-surface">
|
|
25
22
|
<slot name="headline" />
|
|
26
23
|
</div>
|
|
27
24
|
{/if}
|
|
28
|
-
<div class="body-medium on-surface-variant
|
|
25
|
+
<div class="body-medium text-on-surface-variant">
|
|
29
26
|
{#if $$slots.line1}
|
|
30
27
|
<slot name="line1" />
|
|
31
28
|
{/if}
|
|
32
29
|
</div>
|
|
33
30
|
{#if $$slots.line2}
|
|
34
|
-
<div class="body-medium on-surface-variant
|
|
31
|
+
<div class="body-medium text-on-surface-variant">
|
|
35
32
|
<slot name="line2" />
|
|
36
33
|
</div>
|
|
37
34
|
{/if}
|
|
38
35
|
{#if $$slots.line3}
|
|
39
|
-
<div class="body-medium on-surface-variant
|
|
36
|
+
<div class="body-medium text-on-surface-variant">
|
|
40
37
|
<slot name="line3" />
|
|
41
38
|
</div>
|
|
42
39
|
{/if}
|
|
43
40
|
{/if}
|
|
44
41
|
{:else if type === "trailingText"}
|
|
45
|
-
<div class="label-small on-surface-variant
|
|
42
|
+
<div class="label-small text-on-surface-variant">
|
|
46
43
|
<slot />
|
|
47
44
|
</div>
|
|
48
45
|
{:else}
|