@likable-hair/svelte 3.0.44 → 3.0.45
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/composed/forms/CountriesAutocomplete.svelte +18 -6
- package/dist/components/composed/forms/CountriesAutocomplete.svelte.d.ts +10 -0
- package/dist/components/simple/forms/Autocomplete.svelte +13 -4
- package/dist/components/simple/forms/Autocomplete.svelte.d.ts +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<script>import "/node_modules/flag-icons/css/flag-icons.min.css";
|
|
2
2
|
import Autocomplete, {
|
|
3
3
|
} from "../../simple/forms/Autocomplete.svelte";
|
|
4
|
+
let clazz = {};
|
|
5
|
+
export { clazz as class };
|
|
4
6
|
export let autocompleteProps = {};
|
|
5
7
|
let items = [
|
|
6
8
|
{ value: "AD", label: "Andorra" },
|
|
@@ -259,19 +261,29 @@ let items = [
|
|
|
259
261
|
items={items}
|
|
260
262
|
{...autocompleteProps}
|
|
261
263
|
>
|
|
262
|
-
<svelte:fragment
|
|
263
|
-
|
|
264
|
+
<svelte:fragment
|
|
265
|
+
slot="chip-label"
|
|
266
|
+
let:selection
|
|
267
|
+
>
|
|
268
|
+
<span
|
|
269
|
+
class="flag-icon fi fi-{selection.value.toString().toLowerCase()} fis {clazz.flagIcon || ''}"
|
|
270
|
+
></span>
|
|
264
271
|
{selection.label}
|
|
265
272
|
</svelte:fragment>
|
|
266
|
-
<svelte:fragment
|
|
267
|
-
|
|
273
|
+
<svelte:fragment
|
|
274
|
+
slot="item-label"
|
|
275
|
+
let:item
|
|
276
|
+
>
|
|
277
|
+
<span
|
|
278
|
+
class="flag-icon fi fi-{item.value.toString().toLowerCase()} fis {clazz.flagIcon || ''}"
|
|
279
|
+
></span>
|
|
268
280
|
{item.label}
|
|
269
281
|
</svelte:fragment>
|
|
270
282
|
</Autocomplete>
|
|
271
283
|
|
|
272
284
|
<style>
|
|
273
|
-
.
|
|
285
|
+
.flag-icon {
|
|
274
286
|
border-radius: 4px;
|
|
275
|
-
font-size: 1.2rem;
|
|
287
|
+
font-size: var(--countries-autocomplete-flag-icon-size, 1.2rem);
|
|
276
288
|
}
|
|
277
289
|
</style>
|
|
@@ -3,10 +3,20 @@ import "/node_modules/flag-icons/css/flag-icons.min.css";
|
|
|
3
3
|
import { type Item } from "../../simple/forms/Autocomplete.svelte";
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
|
+
class?: {
|
|
7
|
+
flagIcon?: string | undefined;
|
|
8
|
+
} | undefined;
|
|
6
9
|
autocompleteProps?: Omit<{
|
|
7
10
|
class?: {
|
|
8
11
|
activator?: string | undefined;
|
|
9
12
|
menu?: string | undefined;
|
|
13
|
+
simpleTextfield?: {
|
|
14
|
+
container?: string | undefined;
|
|
15
|
+
row?: string | undefined;
|
|
16
|
+
field?: string | undefined;
|
|
17
|
+
hint?: string | undefined;
|
|
18
|
+
input?: string | undefined;
|
|
19
|
+
} | undefined;
|
|
10
20
|
} | undefined;
|
|
11
21
|
values?: Item[] | undefined;
|
|
12
22
|
items: Item[];
|
|
@@ -170,12 +170,12 @@ import MenuOrDrawer from "../../composed/common/MenuOrDrawer.svelte";
|
|
|
170
170
|
<div class="not-visible-chip-number">+ {notVisibleChipNumber}</div>
|
|
171
171
|
</slot>
|
|
172
172
|
{/if}
|
|
173
|
-
|
|
173
|
+
|
|
174
174
|
<SimpleTextField
|
|
175
175
|
--simple-textfield-max-width="min(200px, 90%)"
|
|
176
176
|
--simple-textfield-height="auto"
|
|
177
177
|
--simple-textfield-padding="0px"
|
|
178
|
-
--simple-textfield-background-color="rgb(1, 1, 1, 0)"
|
|
178
|
+
--simple-textfield-default-background-color="rgb(1, 1, 1, 0)"
|
|
179
179
|
--simple-textfield-default-margin-bottom="0px"
|
|
180
180
|
--simple-textfield-default-margin-left="10px"
|
|
181
181
|
bind:value={searchText}
|
|
@@ -188,6 +188,7 @@ import MenuOrDrawer from "../../composed/common/MenuOrDrawer.svelte";
|
|
|
188
188
|
{disabled}
|
|
189
189
|
placeholder={placeholder}
|
|
190
190
|
bind:input={input}
|
|
191
|
+
class={clazz.simpleTextfield}
|
|
191
192
|
></SimpleTextField>
|
|
192
193
|
</div>
|
|
193
194
|
</slot>
|
|
@@ -312,13 +313,21 @@ import MenuOrDrawer from "../../composed/common/MenuOrDrawer.svelte";
|
|
|
312
313
|
var(--autocomplete-default-border-radius)
|
|
313
314
|
);
|
|
314
315
|
padding: var(
|
|
315
|
-
--autocomplete-
|
|
316
|
+
--autocomplete-padding,
|
|
316
317
|
var(--autocomplete-default-padding)
|
|
317
318
|
);
|
|
318
319
|
min-height: var(
|
|
319
320
|
--autocomplete-min-height,
|
|
320
321
|
var(--autocomplete-default-min-height)
|
|
321
|
-
)
|
|
322
|
+
);
|
|
323
|
+
transition: all .1s;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.selection-container:focus-within {
|
|
327
|
+
border: var(
|
|
328
|
+
--autocomplete-focus-border,
|
|
329
|
+
var(--autocomplete-default-focus-border)
|
|
330
|
+
);
|
|
322
331
|
}
|
|
323
332
|
|
|
324
333
|
.selection-item {
|
|
@@ -6,11 +6,14 @@ export type Item = {
|
|
|
6
6
|
};
|
|
7
7
|
import '../../../css/main.css';
|
|
8
8
|
import './Autocomplete.css';
|
|
9
|
+
import { type ComponentProps } from "svelte";
|
|
10
|
+
import SimpleTextField from "./SimpleTextField.svelte";
|
|
9
11
|
declare const __propDef: {
|
|
10
12
|
props: {
|
|
11
13
|
class?: {
|
|
12
14
|
activator?: string | undefined;
|
|
13
15
|
menu?: string | undefined;
|
|
16
|
+
simpleTextfield?: ComponentProps<SimpleTextField>['class'];
|
|
14
17
|
} | undefined;
|
|
15
18
|
values?: Item[] | undefined;
|
|
16
19
|
items: Item[];
|
package/dist/index.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export { default as GlobalSearchTextField } from './components/composed/search/G
|
|
|
52
52
|
export { default as MenuOrDrawer } from './components/composed/common/MenuOrDrawer.svelte';
|
|
53
53
|
export { default as MenuOrDrawerOptions } from './components/composed/common/MenuOrDrawerOptions.svelte';
|
|
54
54
|
export { default as AsyncAutocomplete } from './components/composed/forms/AsyncAutocomplete.svelte';
|
|
55
|
+
export { default as CountriesAutocomplete } from './components/composed/forms/CountriesAutocomplete.svelte';
|
|
55
56
|
export { default as FilterBuilder } from './utils/filters/builder';
|
|
56
57
|
export { default as FilterConverter } from './utils/filters/filters';
|
|
57
58
|
export { default as FilterValidator } from './utils/filters/validator';
|
package/dist/index.js
CHANGED
|
@@ -52,6 +52,7 @@ export { default as GlobalSearchTextField } from './components/composed/search/G
|
|
|
52
52
|
export { default as MenuOrDrawer } from './components/composed/common/MenuOrDrawer.svelte';
|
|
53
53
|
export { default as MenuOrDrawerOptions } from './components/composed/common/MenuOrDrawerOptions.svelte';
|
|
54
54
|
export { default as AsyncAutocomplete } from './components/composed/forms/AsyncAutocomplete.svelte';
|
|
55
|
+
export { default as CountriesAutocomplete } from './components/composed/forms/CountriesAutocomplete.svelte';
|
|
55
56
|
export { default as FilterBuilder } from './utils/filters/builder';
|
|
56
57
|
export { default as FilterConverter } from './utils/filters/filters';
|
|
57
58
|
export { default as FilterValidator } from './utils/filters/validator';
|