@likable-hair/svelte 3.0.43 → 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.
@@ -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 slot="chip-label" let:selection>
263
- <span class="fi fi-{selection.value.toString().toLowerCase()} fis"></span>
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 slot="item-label" let:item>
267
- <span class="fi fi-{item.value.toString().toLowerCase()} fis"></span>
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
- .fis {
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[];
@@ -131,7 +131,7 @@ $:
131
131
  </div>
132
132
  <div class="filter-editor">
133
133
  {#if tmpFilter.advanced && step == 'advanced' && canRenderOptions}
134
- <div class="advanced-mode" in:fly={{delay: 100, x: 200, duration: 100}} out:fly={{x: -200, duration: 100}}>
134
+ <div class="advanced-mode" in:fly|local={{delay: 100, x: 200, duration: 100}} out:fly|local={{x: -200, duration: 100}}>
135
135
  <div class="advanced-mode-selector" on:click|stopPropagation on:keypress>
136
136
  <SelectableVerticalList
137
137
  bind:selected={advancedModeSelectedOption}
@@ -146,7 +146,7 @@ $:
146
146
  </div>
147
147
  </div>
148
148
  {:else if step == 'editor' && (!tmpFilter.advanced || !!advancedModeSelectedOption)}
149
- <div class="editor" in:fly={{delay: 100, x: 200, duration: 100}} out:fly={{x: -200, duration: 100}}>
149
+ <div class="editor" in:fly|local={{delay: 100, x: 200, duration: 100}} out:fly|local={{x: -200, duration: 100}}>
150
150
  <div class="fields-container">
151
151
  <div class="fields"
152
152
  on:click|stopPropagation
@@ -242,6 +242,7 @@ let sidebarExpanded = false;
242
242
  transition-duration: .2s;
243
243
  right: 0;
244
244
  top: 0;
245
+ z-index: 10;
245
246
  }
246
247
 
247
248
 
@@ -225,8 +225,8 @@ function handleMenuClick(e, zIndex2) {
225
225
  style:width={_width}
226
226
  style:min-width={_minWidth}
227
227
  style:overflow={_overflow}
228
- in:inAnimation={inAnimationConfig}
229
- out:outAnimation={outAnimationConfig}
228
+ in:inAnimation|local={inAnimationConfig}
229
+ out:outAnimation|local={outAnimationConfig}
230
230
  on:click={(e) => handleMenuClick(e, zIndex)}
231
231
  on:keydown
232
232
  >
@@ -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-paddding,
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';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@likable-hair/svelte",
3
3
  "description": "A Svelte component for likablehair",
4
- "version": "3.0.43",
4
+ "version": "3.0.45",
5
5
  "scripts": {
6
6
  "host": "vite --host",
7
7
  "dev": "vite dev",