@skeletonlabs/skeleton 2.2.0-dev.51be6c34 → 2.2.0-dev.f9583337
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,6 +25,9 @@ export let chips = "variant-filled";
|
|
|
25
25
|
export let invalid = "input-error";
|
|
26
26
|
export let padding = "p-2";
|
|
27
27
|
export let rounded = "rounded-container-token";
|
|
28
|
+
export let regionChipWrapper = "";
|
|
29
|
+
export let regionChipList = "";
|
|
30
|
+
export let regionInput = "";
|
|
28
31
|
export let transitions = !$prefersReducedMotionStore;
|
|
29
32
|
export let listTransitionIn = fly;
|
|
30
33
|
export let listTransitionInParams = { duration: 150, opacity: 0, y: -20 };
|
|
@@ -35,7 +38,7 @@ export let chipTransitionInParams = { duration: 150, opacity: 0 };
|
|
|
35
38
|
export let chipTransitionOut = scale;
|
|
36
39
|
export let chipTransitionOutParams = { duration: 150, opacity: 0 };
|
|
37
40
|
const cBase = "textarea cursor-pointer";
|
|
38
|
-
const
|
|
41
|
+
const cChipWrapper = "space-y-4";
|
|
39
42
|
const cChipList = "flex flex-wrap gap-2";
|
|
40
43
|
const cInputField = "unstyled bg-transparent border-0 !ring-0 p-0 w-full";
|
|
41
44
|
let inputValid = true;
|
|
@@ -105,11 +108,11 @@ $:
|
|
|
105
108
|
$:
|
|
106
109
|
classesBase = `${cBase} ${padding} ${rounded} ${$$props.class ?? ""} ${classesInvalid}`;
|
|
107
110
|
$:
|
|
108
|
-
|
|
111
|
+
classesChipWrapper = `${cChipWrapper} ${regionChipWrapper}`;
|
|
109
112
|
$:
|
|
110
|
-
classesChipList = `${cChipList}`;
|
|
113
|
+
classesChipList = `${cChipList} ${regionChipList}`;
|
|
111
114
|
$:
|
|
112
|
-
|
|
115
|
+
classesInput = `${cInputField} ${regionInput}`;
|
|
113
116
|
$:
|
|
114
117
|
chipValues = value?.map((val, i) => {
|
|
115
118
|
if (chipValues[i]?.val === val)
|
|
@@ -126,15 +129,15 @@ $:
|
|
|
126
129
|
{#each value as option}<option value={option}>{option}</option>{/each}
|
|
127
130
|
</select>
|
|
128
131
|
</div>
|
|
129
|
-
<!--
|
|
130
|
-
<div class="input-chip-
|
|
132
|
+
<!-- Chip Wrapper -->
|
|
133
|
+
<div class="input-chip-wrapper {classesChipWrapper}">
|
|
131
134
|
<!-- Input Field -->
|
|
132
135
|
<form on:submit={addChip}>
|
|
133
136
|
<input
|
|
134
137
|
type="text"
|
|
135
138
|
bind:value={input}
|
|
136
139
|
placeholder={$$restProps.placeholder ?? 'Enter values...'}
|
|
137
|
-
class="input-chip-field {
|
|
140
|
+
class="input-chip-field {classesInput}"
|
|
138
141
|
on:input={onInputHandler}
|
|
139
142
|
on:input
|
|
140
143
|
on:focus
|
|
@@ -38,6 +38,12 @@ declare class __sveltets_Render<ListTransitionIn extends Transition = FlyTransit
|
|
|
38
38
|
padding?: string | undefined;
|
|
39
39
|
/** Provide classes to set border radius styles.*/
|
|
40
40
|
rounded?: string | undefined;
|
|
41
|
+
/** Provide arbitrary classes to style the chip wrapper region.*/
|
|
42
|
+
regionChipWrapper?: string | undefined;
|
|
43
|
+
/** Provide arbitrary classes to style the chip list region.*/
|
|
44
|
+
regionChipList?: string | undefined;
|
|
45
|
+
/** Provide arbitrary classes to style the input field region.*/
|
|
46
|
+
regionInput?: string | undefined;
|
|
41
47
|
/** Enable/Disable transitions*/
|
|
42
48
|
transitions?: boolean | undefined;
|
|
43
49
|
/** Provide the transition used in list on entry.*/
|