@skeletonlabs/skeleton 2.10.0 → 2.10.1-dev.25759ed8
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.
|
@@ -25,21 +25,7 @@ function prunedRestProps() {
|
|
|
25
25
|
}
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
|
-
<a
|
|
29
|
-
class="app-rail-anchor {classesBase}"
|
|
30
|
-
href={$$props.href}
|
|
31
|
-
{...prunedRestProps()}
|
|
32
|
-
role="button"
|
|
33
|
-
on:click
|
|
34
|
-
on:keydown
|
|
35
|
-
on:keyup
|
|
36
|
-
on:keypress
|
|
37
|
-
on:mouseover
|
|
38
|
-
on:mouseleave
|
|
39
|
-
on:focus
|
|
40
|
-
on:blur
|
|
41
|
-
data-testid="app-rail-anchor"
|
|
42
|
-
>
|
|
28
|
+
<a class="app-rail-anchor {classesBase}" href={$$props.href} {...prunedRestProps()} data-testid="app-rail-anchor">
|
|
43
29
|
<div class="app-rail-wrapper {classesWrapper}">
|
|
44
30
|
{#if $$slots.lead}<div class="app-rail-lead {classesLead}"><slot name="lead" /></div>{/if}
|
|
45
31
|
<div class="app-rail-label {classesLabel}"><slot /></div>
|
|
@@ -14,15 +14,6 @@ declare const __propDef: {
|
|
|
14
14
|
aspectRatio?: string | undefined;
|
|
15
15
|
};
|
|
16
16
|
events: {
|
|
17
|
-
click: MouseEvent;
|
|
18
|
-
keydown: KeyboardEvent;
|
|
19
|
-
keyup: KeyboardEvent;
|
|
20
|
-
keypress: KeyboardEvent;
|
|
21
|
-
mouseover: MouseEvent;
|
|
22
|
-
mouseleave: MouseEvent;
|
|
23
|
-
focus: FocusEvent;
|
|
24
|
-
blur: FocusEvent;
|
|
25
|
-
} & {
|
|
26
17
|
[evt: string]: CustomEvent<any>;
|
|
27
18
|
};
|
|
28
19
|
slots: {
|
|
@@ -59,9 +59,6 @@ onMount(() => {
|
|
|
59
59
|
externalForm.removeEventListener("reset", resetFormHandler);
|
|
60
60
|
};
|
|
61
61
|
});
|
|
62
|
-
function onInputHandler() {
|
|
63
|
-
inputValid = true;
|
|
64
|
-
}
|
|
65
62
|
function validateCustom(chip) {
|
|
66
63
|
return validation === void 0 || validation(chip);
|
|
67
64
|
}
|
|
@@ -97,7 +94,9 @@ function removeChipCommon(chip) {
|
|
|
97
94
|
chipValues.splice(chipIndex, 1);
|
|
98
95
|
chipValues = chipValues;
|
|
99
96
|
}
|
|
100
|
-
function
|
|
97
|
+
function onKeyHandler(event) {
|
|
98
|
+
if (event.key !== "Enter")
|
|
99
|
+
return;
|
|
101
100
|
event.preventDefault();
|
|
102
101
|
inputValid = validate();
|
|
103
102
|
if (inputValid === false) {
|
|
@@ -129,6 +128,10 @@ export function removeChip(chip) {
|
|
|
129
128
|
removeChipCommon(chip);
|
|
130
129
|
dispatch("removeManually", { chipValue: chip });
|
|
131
130
|
}
|
|
131
|
+
function prunedRestProps() {
|
|
132
|
+
delete $$restProps.class;
|
|
133
|
+
return $$restProps;
|
|
134
|
+
}
|
|
132
135
|
$:
|
|
133
136
|
classesInvalid = inputValid === false ? invalid : "";
|
|
134
137
|
$:
|
|
@@ -158,19 +161,18 @@ $:
|
|
|
158
161
|
<!-- Chip Wrapper -->
|
|
159
162
|
<div class="input-chip-wrapper {classesChipWrapper}">
|
|
160
163
|
<!-- Input Field -->
|
|
161
|
-
<
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
</form>
|
|
164
|
+
<input
|
|
165
|
+
type="text"
|
|
166
|
+
bind:value={input}
|
|
167
|
+
placeholder={$$restProps.placeholder ?? 'Enter values...'}
|
|
168
|
+
class="input-chip-field {classesInput}"
|
|
169
|
+
on:keydown={onKeyHandler}
|
|
170
|
+
on:input
|
|
171
|
+
on:focus
|
|
172
|
+
on:blur
|
|
173
|
+
disabled={$$restProps.disabled}
|
|
174
|
+
{...prunedRestProps()}
|
|
175
|
+
/>
|
|
174
176
|
<!-- Chip List -->
|
|
175
177
|
{#if chipValues.length}
|
|
176
178
|
<div
|
|
@@ -76,7 +76,7 @@ declare class __sveltets_Render<ListTransitionIn extends Transition = FlyTransit
|
|
|
76
76
|
keydown: KeyboardEvent;
|
|
77
77
|
keyup: KeyboardEvent;
|
|
78
78
|
add: CustomEvent<{
|
|
79
|
-
event:
|
|
79
|
+
event: KeyboardEvent;
|
|
80
80
|
chipIndex: number;
|
|
81
81
|
chipValue: string;
|
|
82
82
|
}>;
|
|
@@ -93,7 +93,7 @@ declare class __sveltets_Render<ListTransitionIn extends Transition = FlyTransit
|
|
|
93
93
|
chipValue: string;
|
|
94
94
|
}>;
|
|
95
95
|
invalid: CustomEvent<{
|
|
96
|
-
event:
|
|
96
|
+
event: KeyboardEvent;
|
|
97
97
|
input: string;
|
|
98
98
|
}>;
|
|
99
99
|
invalidManually: CustomEvent<{
|