@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,26 +1,28 @@
|
|
|
1
|
+
// AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
|
|
2
|
+
// @quaffHash 59d32044c3aee07fb108f91f740e8e1a
|
|
1
3
|
export const QRailbarDocsProps = [
|
|
2
4
|
{
|
|
3
5
|
name: "width",
|
|
4
|
-
type: "
|
|
5
|
-
optional:
|
|
6
|
+
type: "CssValue | number",
|
|
7
|
+
optional: true,
|
|
6
8
|
clickableType: true,
|
|
7
9
|
description: "",
|
|
8
|
-
default: "",
|
|
10
|
+
default: "88px",
|
|
9
11
|
},
|
|
10
12
|
{
|
|
11
13
|
name: "side",
|
|
12
14
|
type: '"left" | "right"',
|
|
13
|
-
optional:
|
|
15
|
+
optional: true,
|
|
14
16
|
clickableType: false,
|
|
15
17
|
description: "",
|
|
16
|
-
default: "",
|
|
18
|
+
default: "left",
|
|
17
19
|
},
|
|
18
20
|
{
|
|
19
21
|
name: "bordered",
|
|
20
22
|
type: "boolean",
|
|
21
|
-
optional:
|
|
23
|
+
optional: true,
|
|
22
24
|
clickableType: false,
|
|
23
25
|
description: "",
|
|
24
|
-
default: "",
|
|
26
|
+
default: "false",
|
|
25
27
|
},
|
|
26
28
|
];
|
|
@@ -1,84 +1,38 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { browser } from "$app/environment";
|
|
6
|
-
export let options, multiple = false, 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;
|
|
1
|
+
<script>import { browser } from "$app/environment";
|
|
2
|
+
import { onMount, onDestroy } from "svelte";
|
|
3
|
+
import { QIcon } from "../..";
|
|
4
|
+
export let options, multiple = 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;
|
|
7
5
|
export { userClasses as class };
|
|
6
|
+
let focus = false;
|
|
8
7
|
let active = false;
|
|
9
8
|
$:
|
|
10
|
-
active = typeof value === "number" || value?.length > 0;
|
|
11
|
-
$:
|
|
12
|
-
hasBorder = bordered || rounded || outlined;
|
|
13
|
-
$:
|
|
14
|
-
classes = createClasses(
|
|
15
|
-
[
|
|
16
|
-
"q-select",
|
|
17
|
-
label && "label",
|
|
18
|
-
active && "active",
|
|
19
|
-
dense && "dense",
|
|
20
|
-
$$slots.prepend && "prepend",
|
|
21
|
-
$$slots.append && "append",
|
|
22
|
-
hasBorder && "has-border",
|
|
23
|
-
rounded && "rounded",
|
|
24
|
-
filled && "filled",
|
|
25
|
-
error && "error",
|
|
26
|
-
disable && "disabled"
|
|
27
|
-
],
|
|
28
|
-
{
|
|
29
|
-
component: "q-select",
|
|
30
|
-
userClasses
|
|
31
|
-
}
|
|
32
|
-
);
|
|
9
|
+
active = typeof value === "number" || value?.length > 0 || focus;
|
|
33
10
|
let wrapper = null;
|
|
34
|
-
let inputElement = null;
|
|
35
11
|
let isMenuOpen = false;
|
|
36
12
|
let wasClicked = false;
|
|
37
13
|
let preventClose = false;
|
|
38
|
-
$:
|
|
39
|
-
value && updateInput(inputElement);
|
|
40
|
-
function updateInput(target) {
|
|
41
|
-
const input = target;
|
|
42
|
-
if (!wrapper || !input) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
const label2 = wrapper.querySelector("label");
|
|
46
|
-
const isBorder = hasBorder && !filled;
|
|
47
|
-
if (active) {
|
|
48
|
-
if (isBorder && label2) {
|
|
49
|
-
const labelWidth = textWidth(label2, "0.75rem Arial");
|
|
50
|
-
let width = active ? labelWidth : Math.round(labelWidth / 1.33);
|
|
51
|
-
width = width / 16;
|
|
52
|
-
const start = rounded ? 1.25 : 0.75;
|
|
53
|
-
const end = width + start + 0.5;
|
|
54
|
-
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%)`;
|
|
55
|
-
} else
|
|
56
|
-
input.style.clipPath = "";
|
|
57
|
-
} else {
|
|
58
|
-
input.style.clipPath = "";
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
14
|
function handleMousedown() {
|
|
62
15
|
isMenuOpen = !isMenuOpen;
|
|
63
16
|
wasClicked = true;
|
|
64
17
|
}
|
|
65
|
-
function handleFocus(
|
|
18
|
+
function handleFocus() {
|
|
19
|
+
focus = true;
|
|
66
20
|
if (!wasClicked) {
|
|
67
21
|
isMenuOpen = true;
|
|
68
22
|
}
|
|
69
23
|
wasClicked = false;
|
|
70
|
-
updateInput(target);
|
|
71
24
|
}
|
|
72
|
-
function handleBlur(
|
|
25
|
+
function handleBlur() {
|
|
26
|
+
focus = false;
|
|
73
27
|
if (!multiple && !preventClose) {
|
|
74
28
|
isMenuOpen = false;
|
|
75
29
|
}
|
|
76
30
|
preventClose = false;
|
|
77
|
-
updateInput(target);
|
|
78
31
|
}
|
|
79
32
|
let selectedOptions = [];
|
|
80
33
|
$:
|
|
81
34
|
selectedOptions = options.map((option) => isSelected(option), value);
|
|
35
|
+
let slotPrependWidth = 0;
|
|
82
36
|
function isSelected(option) {
|
|
83
37
|
const optionValue = typeof option === "string" ? option : option.value;
|
|
84
38
|
return multiple ? value.includes(optionValue) : value === optionValue;
|
|
@@ -117,47 +71,87 @@ onDestroy(() => {
|
|
|
117
71
|
});
|
|
118
72
|
</script>
|
|
119
73
|
|
|
120
|
-
<div
|
|
121
|
-
|
|
74
|
+
<div
|
|
75
|
+
class="q-select q-field {userClasses}"
|
|
76
|
+
class:q-field--default={!outlined && !rounded && !filled}
|
|
77
|
+
class:q-field--outlined={outlined}
|
|
78
|
+
class:q-field--rounded={rounded}
|
|
79
|
+
class:q-field--filled={filled}
|
|
80
|
+
class:q-field--has-border={outlined || rounded}
|
|
81
|
+
class:q-field--dense={dense}
|
|
82
|
+
class:q-field--active={active}
|
|
83
|
+
class:q-field--focus={focus}
|
|
84
|
+
class:q-field--label={label}
|
|
85
|
+
class:q-field--slot-append={$$slots.append}
|
|
86
|
+
class:q-field--slot-prepend={$$slots.prepend}
|
|
87
|
+
class:q-field--disable={disable}
|
|
88
|
+
class:q-field--error={error}
|
|
89
|
+
class:q-field--bottom-space={hint || (error && errorMessage)}
|
|
90
|
+
style:--slot-prepend-width="{slotPrependWidth}px"
|
|
91
|
+
{...$$restProps}
|
|
92
|
+
>
|
|
93
|
+
{#if $$slots.before}
|
|
94
|
+
<div class="q-field__slot-before">
|
|
95
|
+
<slot name="before" />
|
|
96
|
+
</div>
|
|
97
|
+
{/if}
|
|
122
98
|
|
|
123
|
-
<
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
tabindex={disable === true ? -1 : 0}
|
|
131
|
-
readonly
|
|
132
|
-
disabled={disable}
|
|
133
|
-
/>
|
|
99
|
+
<div class="q-field__inner">
|
|
100
|
+
<label class="q-field__wrapper">
|
|
101
|
+
{#if $$slots.prepend}
|
|
102
|
+
<div class="q-field__slot-prepend" bind:clientWidth={slotPrependWidth}>
|
|
103
|
+
<slot name="prepend" />
|
|
104
|
+
</div>
|
|
105
|
+
{/if}
|
|
134
106
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
107
|
+
<input
|
|
108
|
+
class="q-field__input"
|
|
109
|
+
bind:value
|
|
110
|
+
placeholder=""
|
|
111
|
+
on:focus={handleFocus}
|
|
112
|
+
on:blur={handleBlur}
|
|
113
|
+
on:mousedown={handleMousedown}
|
|
114
|
+
disabled={disable}
|
|
115
|
+
tabindex={disable === true ? -1 : 0}
|
|
116
|
+
readonly
|
|
117
|
+
/>
|
|
139
118
|
|
|
140
|
-
|
|
119
|
+
<span class="q-field__label">{label}</span>
|
|
141
120
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
<a
|
|
145
|
-
href={multiple ? "javascript:void(0)" : undefined}
|
|
146
|
-
class="q-select__option {selectedOptions[idx] ? 'q-select__option--selected' : ''}"
|
|
147
|
-
on:mousedown={() => (preventClose = true)}
|
|
148
|
-
on:click={(e) => select(e, option)}>{typeof option === "string" ? option : option.value}</a
|
|
149
|
-
>
|
|
150
|
-
{/each}
|
|
151
|
-
</div>
|
|
121
|
+
<div class="q-field__slot-append">
|
|
122
|
+
<slot name="append" />
|
|
152
123
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
124
|
+
<QIcon
|
|
125
|
+
class="q-select__arrow-toggle {$$slots.append
|
|
126
|
+
? 'q-select__arrow-toggle--has-append'
|
|
127
|
+
: ''}"
|
|
128
|
+
name={`arrow_drop_${isMenuOpen ? "up" : "down"}`}
|
|
129
|
+
/>
|
|
130
|
+
</div>
|
|
131
|
+
</label>
|
|
132
|
+
|
|
133
|
+
<div class="q-select__menu {isMenuOpen ? 'q-select__menu--active' : ''}">
|
|
134
|
+
{#each options as option, idx}
|
|
135
|
+
<a
|
|
136
|
+
href={multiple ? "javascript:void(0)" : undefined}
|
|
137
|
+
class="q-select__option {selectedOptions[idx] ? 'q-select__option--selected' : ''}"
|
|
138
|
+
on:mousedown={() => (preventClose = true)}
|
|
139
|
+
on:click={(e) => select(e, option)}
|
|
140
|
+
>{typeof option === "string" ? option : option.value}</a
|
|
141
|
+
>
|
|
142
|
+
{/each}
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
{#if error && errorMessage}
|
|
146
|
+
<div class="q-field__error">{errorMessage}</div>
|
|
147
|
+
{:else if hint}
|
|
148
|
+
<div class="q-field__hint">{hint}</div>
|
|
149
|
+
{/if}
|
|
150
|
+
</div>
|
|
157
151
|
|
|
158
|
-
{#if
|
|
159
|
-
<
|
|
160
|
-
|
|
161
|
-
|
|
152
|
+
{#if $$slots.after}
|
|
153
|
+
<div class="q-field__slot-after">
|
|
154
|
+
<slot name="after" />
|
|
155
|
+
</div>
|
|
162
156
|
{/if}
|
|
163
157
|
</div>
|
|
@@ -5,7 +5,6 @@ declare const __propDef: {
|
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
options: QSelectProps["options"];
|
|
7
7
|
multiple?: QSelectProps["multiple"];
|
|
8
|
-
bordered?: QSelectProps["bordered"];
|
|
9
8
|
dense?: QSelectProps["dense"];
|
|
10
9
|
disable?: QSelectProps["disable"];
|
|
11
10
|
error?: QSelectProps["error"];
|
|
@@ -22,8 +21,10 @@ declare const __propDef: {
|
|
|
22
21
|
[evt: string]: CustomEvent<any>;
|
|
23
22
|
};
|
|
24
23
|
slots: {
|
|
24
|
+
before: {};
|
|
25
25
|
prepend: {};
|
|
26
26
|
append: {};
|
|
27
|
+
after: {};
|
|
27
28
|
};
|
|
28
29
|
};
|
|
29
30
|
type QSelectProps_ = typeof __propDef.props;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "../../utils
|
|
1
|
+
import type { QComponentDocs } from "../../utils";
|
|
2
2
|
export declare let QSelectDocs: QComponentDocs;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export let QSelectDocs = {
|
|
2
2
|
name: "QSelect",
|
|
3
|
-
description: "QSelect is a form component that allows users to choose from multiple options in a dropdown list. It supports single and multiple selection, as well as different visual styles such as
|
|
3
|
+
description: "QSelect is a form component that allows users to choose from multiple options in a dropdown list. It supports single and multiple selection, as well as different visual styles such as filled, outlined, and rounded.",
|
|
4
4
|
docs: {
|
|
5
5
|
props: [
|
|
6
6
|
{
|
|
@@ -21,12 +21,6 @@ export let QSelectDocs = {
|
|
|
21
21
|
description: "Options available for selection.",
|
|
22
22
|
clickableType: true,
|
|
23
23
|
},
|
|
24
|
-
{
|
|
25
|
-
name: "bordered",
|
|
26
|
-
type: "boolean",
|
|
27
|
-
default: false,
|
|
28
|
-
description: "Whether the select component has a border.",
|
|
29
|
-
},
|
|
30
24
|
{
|
|
31
25
|
name: "disable",
|
|
32
26
|
type: "boolean",
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
// AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
|
|
2
|
+
// @quaffHash 672deee79cbdb08b347a495e2f956037
|
|
1
3
|
export const QSelectDocsProps = [
|
|
2
4
|
{
|
|
3
5
|
name: "value",
|
|
4
|
-
type: "
|
|
6
|
+
type: "QSelectValue",
|
|
5
7
|
optional: false,
|
|
6
8
|
clickableType: true,
|
|
7
9
|
description: "",
|
|
@@ -23,14 +25,6 @@ export const QSelectDocsProps = [
|
|
|
23
25
|
description: "",
|
|
24
26
|
default: "",
|
|
25
27
|
},
|
|
26
|
-
{
|
|
27
|
-
name: "bordered",
|
|
28
|
-
type: "boolean",
|
|
29
|
-
optional: true,
|
|
30
|
-
clickableType: false,
|
|
31
|
-
description: "",
|
|
32
|
-
default: "",
|
|
33
|
-
},
|
|
34
28
|
{
|
|
35
29
|
name: "dense",
|
|
36
30
|
type: "boolean",
|
|
@@ -42,7 +36,7 @@ export const QSelectDocsProps = [
|
|
|
42
36
|
{
|
|
43
37
|
name: "disable",
|
|
44
38
|
type: "boolean",
|
|
45
|
-
optional:
|
|
39
|
+
optional: true,
|
|
46
40
|
clickableType: false,
|
|
47
41
|
description: "",
|
|
48
42
|
default: "",
|
|
@@ -50,7 +44,7 @@ export const QSelectDocsProps = [
|
|
|
50
44
|
{
|
|
51
45
|
name: "error",
|
|
52
46
|
type: "boolean",
|
|
53
|
-
optional:
|
|
47
|
+
optional: true,
|
|
54
48
|
clickableType: false,
|
|
55
49
|
description: "",
|
|
56
50
|
default: "",
|
|
@@ -66,7 +60,7 @@ export const QSelectDocsProps = [
|
|
|
66
60
|
{
|
|
67
61
|
name: "filled",
|
|
68
62
|
type: "boolean",
|
|
69
|
-
optional:
|
|
63
|
+
optional: true,
|
|
70
64
|
clickableType: false,
|
|
71
65
|
description: "",
|
|
72
66
|
default: "",
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
@include field;
|
|
1
|
+
@import "$css/shared/q-field.scss";
|
|
3
2
|
|
|
3
|
+
.q-select {
|
|
4
4
|
&__option--selected {
|
|
5
5
|
color: var(--primary);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
.q-field__wrapper,
|
|
9
|
+
.q-field__input {
|
|
9
10
|
cursor: pointer;
|
|
10
11
|
}
|
|
11
12
|
|
|
@@ -30,11 +31,23 @@
|
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
&.q-field--bottom-space &__menu {
|
|
35
|
+
bottom: 1.0625rem;
|
|
36
|
+
}
|
|
37
|
+
|
|
33
38
|
& &__arrow-toggle {
|
|
34
39
|
cursor: pointer;
|
|
35
40
|
|
|
36
41
|
&--has-append {
|
|
37
|
-
|
|
42
|
+
margin-left: 0.5rem;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.q-field--disable {
|
|
47
|
+
opacity: 0.5;
|
|
48
|
+
&,
|
|
49
|
+
* {
|
|
50
|
+
cursor: not-allowed;
|
|
38
51
|
}
|
|
39
52
|
}
|
|
40
53
|
}
|
|
@@ -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 QSelectOption = string | {
|
|
4
4
|
label: string;
|
|
@@ -11,7 +11,6 @@ export interface QSelectProps extends NativeProps, HTMLAttributes<HTMLDivElement
|
|
|
11
11
|
value: QSelectValue;
|
|
12
12
|
multiple?: boolean;
|
|
13
13
|
options: QSelectOption[];
|
|
14
|
-
bordered?: boolean;
|
|
15
14
|
dense?: boolean;
|
|
16
15
|
disable?: boolean;
|
|
17
16
|
error?: boolean;
|
|
@@ -23,7 +22,6 @@ export interface QSelectProps extends NativeProps, HTMLAttributes<HTMLDivElement
|
|
|
23
22
|
rounded?: boolean;
|
|
24
23
|
}
|
|
25
24
|
export declare const QSelectPropsDefaults: {
|
|
26
|
-
bordered: boolean;
|
|
27
25
|
dense: boolean;
|
|
28
26
|
disable: boolean;
|
|
29
27
|
error: boolean;
|
|
@@ -1,63 +1,52 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
export let spacing = "none", inset = false, vertical = false, color = void 0, size =
|
|
1
|
+
<script>import { useSize } from "../../composables";
|
|
2
|
+
export let spacing = "none", inset = false, vertical = false, color = void 0, size = void 0, text = void 0, textAlign = vertical ? "middle" : "center", userClasses = void 0;
|
|
3
3
|
export { userClasses as class };
|
|
4
|
-
|
|
4
|
+
let orientation;
|
|
5
5
|
$:
|
|
6
|
-
|
|
7
|
-
let orientationClass;
|
|
6
|
+
orientation = vertical ? "vertical" : "horizontal";
|
|
8
7
|
$:
|
|
9
|
-
|
|
8
|
+
spacingClass = useSize(spacing).class || "";
|
|
10
9
|
$:
|
|
11
|
-
|
|
12
|
-
width: size
|
|
13
|
-
} : {
|
|
14
|
-
height: size
|
|
15
|
-
};
|
|
16
|
-
$:
|
|
17
|
-
insetStyle = inset === true ? vertical === true ? { paddingBlock: "16px" } : { paddingInline: "16px" } : void 0;
|
|
18
|
-
$:
|
|
19
|
-
containerStyle = createStyles({
|
|
20
|
-
...insetStyle,
|
|
21
|
-
display: "flex",
|
|
22
|
-
alignItems: "center",
|
|
23
|
-
flexDirection: vertical === true ? "column" : void 0,
|
|
24
|
-
[vertical === true ? "height" : "width"]: "100%"
|
|
25
|
-
});
|
|
26
|
-
$:
|
|
27
|
-
classes = createClasses([
|
|
28
|
-
"q-separator",
|
|
29
|
-
"q-separator--" + orientationClass,
|
|
30
|
-
spacingClass,
|
|
31
|
-
color,
|
|
32
|
-
userClasses
|
|
33
|
-
]);
|
|
34
|
-
$:
|
|
35
|
-
style = createStyles(
|
|
36
|
-
{
|
|
37
|
-
...orientationStyle
|
|
38
|
-
},
|
|
39
|
-
userStyles
|
|
40
|
-
);
|
|
10
|
+
colorClass = color ? `bg-${color}` : "";
|
|
41
11
|
</script>
|
|
42
12
|
|
|
43
|
-
{#if text
|
|
44
|
-
<div
|
|
45
|
-
{
|
|
46
|
-
|
|
13
|
+
{#if text}
|
|
14
|
+
<div
|
|
15
|
+
class="q-separator__wrapper {userClasses || ''}"
|
|
16
|
+
class:q-separator--vertical__wrapper={vertical}
|
|
17
|
+
class:q-separator--inset__wrapper={inset}
|
|
18
|
+
{...$$restProps}
|
|
19
|
+
>
|
|
20
|
+
{#if (vertical && textAlign !== "top") || (!vertical && textAlign !== "left")}
|
|
21
|
+
<hr
|
|
22
|
+
class="q-separator {spacingClass} {colorClass}"
|
|
23
|
+
class:q-separator--vertical={vertical}
|
|
24
|
+
style:--q-separator--size={size}
|
|
25
|
+
aria-orientation={orientation}
|
|
26
|
+
/>
|
|
47
27
|
{/if}
|
|
48
28
|
<div class={vertical ? "q-py-sm" : "q-px-sm"}>{text}</div>
|
|
49
|
-
{#if (vertical
|
|
50
|
-
<hr
|
|
29
|
+
{#if (vertical && textAlign !== "bottom") || (!vertical && textAlign !== "right")}
|
|
30
|
+
<hr
|
|
31
|
+
class="q-separator {spacingClass} {colorClass}"
|
|
32
|
+
class:q-separator--vertical={vertical}
|
|
33
|
+
style:--q-separator--size={size}
|
|
34
|
+
aria-orientation={orientation}
|
|
35
|
+
/>
|
|
51
36
|
{/if}
|
|
52
37
|
</div>
|
|
53
38
|
{:else}
|
|
54
|
-
<div
|
|
55
|
-
|
|
39
|
+
<div
|
|
40
|
+
class="q-separator__wrapper {userClasses || ''}"
|
|
41
|
+
class:q-separator--vertical__wrapper={vertical}
|
|
42
|
+
class:q-separator--inset__wrapper={inset}
|
|
43
|
+
{...$$restProps}
|
|
44
|
+
>
|
|
45
|
+
<hr
|
|
46
|
+
class="q-separator {spacingClass} {colorClass}"
|
|
47
|
+
class:q-separator--vertical={vertical}
|
|
48
|
+
style:--q-separator--size={size}
|
|
49
|
+
aria-orientation={orientation}
|
|
50
|
+
/>
|
|
56
51
|
</div>
|
|
57
52
|
{/if}
|
|
58
|
-
|
|
59
|
-
<style>.q-separator {
|
|
60
|
-
background-color: var(--outline);
|
|
61
|
-
border: none;
|
|
62
|
-
flex: 1 1 auto;
|
|
63
|
-
}</style>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { QComponentDocs } from "../../utils
|
|
1
|
+
import type { QComponentDocs } from "../../utils";
|
|
2
2
|
export declare let QSeparatorDocs: QComponentDocs;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
// AUTO GENERATED FILE - DO NOT MODIFY OR DELETE
|
|
2
|
+
// @quaffHash 3dc04e42e3fe60388a317edd5035cc9c
|
|
1
3
|
export const QSeparatorPropsVertical = [
|
|
2
4
|
{
|
|
3
5
|
name: "spacing",
|
|
4
|
-
type:
|
|
5
|
-
optional:
|
|
6
|
-
clickableType:
|
|
6
|
+
type: "QuaffSizes",
|
|
7
|
+
optional: true,
|
|
8
|
+
clickableType: true,
|
|
7
9
|
description: "",
|
|
8
10
|
default: "",
|
|
9
11
|
},
|
|
10
12
|
{
|
|
11
13
|
name: "inset",
|
|
12
14
|
type: "boolean",
|
|
13
|
-
optional:
|
|
15
|
+
optional: true,
|
|
14
16
|
clickableType: false,
|
|
15
17
|
description: "",
|
|
16
18
|
default: "",
|
|
@@ -18,7 +20,7 @@ export const QSeparatorPropsVertical = [
|
|
|
18
20
|
{
|
|
19
21
|
name: "vertical",
|
|
20
22
|
type: "true",
|
|
21
|
-
optional:
|
|
23
|
+
optional: true,
|
|
22
24
|
clickableType: false,
|
|
23
25
|
description: "",
|
|
24
26
|
default: "",
|
|
@@ -50,7 +52,7 @@ export const QSeparatorPropsVertical = [
|
|
|
50
52
|
{
|
|
51
53
|
name: "textAlign",
|
|
52
54
|
type: '"top" | "middle" | "bottom"',
|
|
53
|
-
optional:
|
|
55
|
+
optional: true,
|
|
54
56
|
clickableType: false,
|
|
55
57
|
description: "",
|
|
56
58
|
default: "",
|
|
@@ -59,16 +61,16 @@ export const QSeparatorPropsVertical = [
|
|
|
59
61
|
export const QSeparatorPropsHorizontal = [
|
|
60
62
|
{
|
|
61
63
|
name: "spacing",
|
|
62
|
-
type:
|
|
63
|
-
optional:
|
|
64
|
-
clickableType:
|
|
64
|
+
type: "QuaffSizes",
|
|
65
|
+
optional: true,
|
|
66
|
+
clickableType: true,
|
|
65
67
|
description: "",
|
|
66
68
|
default: "",
|
|
67
69
|
},
|
|
68
70
|
{
|
|
69
71
|
name: "inset",
|
|
70
72
|
type: "boolean",
|
|
71
|
-
optional:
|
|
73
|
+
optional: true,
|
|
72
74
|
clickableType: false,
|
|
73
75
|
description: "",
|
|
74
76
|
default: "",
|
|
@@ -76,7 +78,7 @@ export const QSeparatorPropsHorizontal = [
|
|
|
76
78
|
{
|
|
77
79
|
name: "vertical",
|
|
78
80
|
type: "false",
|
|
79
|
-
optional:
|
|
81
|
+
optional: true,
|
|
80
82
|
clickableType: false,
|
|
81
83
|
description: "",
|
|
82
84
|
default: "",
|
|
@@ -92,7 +94,7 @@ export const QSeparatorPropsHorizontal = [
|
|
|
92
94
|
{
|
|
93
95
|
name: "size",
|
|
94
96
|
type: "string",
|
|
95
|
-
optional:
|
|
97
|
+
optional: true,
|
|
96
98
|
clickableType: false,
|
|
97
99
|
description: "",
|
|
98
100
|
default: "",
|
|
@@ -108,7 +110,7 @@ export const QSeparatorPropsHorizontal = [
|
|
|
108
110
|
{
|
|
109
111
|
name: "textAlign",
|
|
110
112
|
type: '"left" | "center" | "right"',
|
|
111
|
-
optional:
|
|
113
|
+
optional: true,
|
|
112
114
|
clickableType: false,
|
|
113
115
|
description: "",
|
|
114
116
|
default: "",
|