@onsvisual/svelte-components 0.1.87 → 0.1.88

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.
@@ -15,7 +15,7 @@
15
15
  export let id = "autocomplete";
16
16
  export let label = "Select an option";
17
17
  export let hideLabel = false;
18
- export let mode = "dropdown";
18
+ export let mode = "default";
19
19
  export let clearable = true;
20
20
  export let autoClear = false;
21
21
  export let placeholder = mode === "search" ? "Enter text" : "Select one";
@@ -94,29 +94,31 @@
94
94
  />
95
95
  </svelte:head>
96
96
 
97
- {#if label}<label for="{id}" style:display="{hideLabel ? "none" : null}">{label}</label>{/if}
98
- <div class="ons-autocomplete-wrapper">
99
- <div
100
- id="{id}-container"
101
- class="ons-autocomplete"
102
- class:hide-menu="{hideMenu}"
103
- use:initAutocomplete
104
- ></div>
105
- {#if clearable && !autoClear && value}
106
- <button
107
- title="Clear selection"
108
- aria-label="Clear selection"
109
- on:click="{clearInput}"
110
- class="ons-autocomplete-clear"
111
- >
112
- <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" viewBox="0 0 14 14" width="18">
113
- <path
114
- fill="currentColor"
115
- d="M13.6 1 l -0.71 -0.71 a 0.5 0.5 0 0 0 -0.71 0 l -5.25 5.25 l -5.25 -5.25 a 0.51 0.51 0 0 0 -0.71 0 l -0.71 0.71 a 0.5 0.5 0 0 0 0 0.71 l 5.25 5.25 l -5.25 5.25 a 0.5 0.5 0 0 0 0 0.71 l 0.71 0.71 a 0.5 0.5 0 0 0 0.71 0 l 5.25 -5.25 l 5.25 5.25 a 0.5 0.5 0 0 0 0.71 0 l 0.71 -0.71 a 0.5 0.5 0 0 0 0 -0.71 l -5.25 -5.25 l 5.25 -5.25 a 0.5 0.5 0 0 0 0 -0.71Z"
116
- ></path>
117
- </svg>
118
- </button>
119
- {/if}
97
+ <div class="ons-field">
98
+ {#if label}<label for="{id}" class="ons-label" class:ons-u-vh="{hideLabel}">{label}</label>{/if}
99
+ <div class="ons-autocomplete-wrapper">
100
+ <div
101
+ id="{id}-container"
102
+ class="ons-autocomplete"
103
+ class:hide-menu="{hideMenu}"
104
+ use:initAutocomplete
105
+ ></div>
106
+ {#if clearable && !autoClear && value}
107
+ <button
108
+ title="Clear selection"
109
+ aria-label="Clear selection"
110
+ on:click="{clearInput}"
111
+ class="ons-autocomplete-clear"
112
+ >
113
+ <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" viewBox="0 0 14 14" width="18">
114
+ <path
115
+ fill="currentColor"
116
+ d="M13.6 1 l -0.71 -0.71 a 0.5 0.5 0 0 0 -0.71 0 l -5.25 5.25 l -5.25 -5.25 a 0.51 0.51 0 0 0 -0.71 0 l -0.71 0.71 a 0.5 0.5 0 0 0 0 0.71 l 5.25 5.25 l -5.25 5.25 a 0.5 0.5 0 0 0 0 0.71 l 0.71 0.71 a 0.5 0.5 0 0 0 0.71 0 l 5.25 -5.25 l 5.25 5.25 a 0.5 0.5 0 0 0 0.71 0 l 0.71 -0.71 a 0.5 0.5 0 0 0 0 -0.71 l -5.25 -5.25 l 5.25 -5.25 a 0.5 0.5 0 0 0 0 -0.71Z"
117
+ ></path>
118
+ </svg>
119
+ </button>
120
+ {/if}
121
+ </div>
120
122
  </div>
121
123
 
122
124
  <style>
@@ -143,7 +145,7 @@
143
145
  display: none;
144
146
  }
145
147
  .ons-autocomplete :global(.autocomplete__input) {
146
- border-radius: 4px !important;
148
+ border-radius: 3px !important;
147
149
  border-width: 1px !important;
148
150
  background: white;
149
151
  }
@@ -158,4 +160,11 @@
158
160
  .ons-autocomplete :global(.muted-text) {
159
161
  opacity: 0.8;
160
162
  font-size: smaller;
163
+ }
164
+ .ons-autocomplete-wrapper :global(*) {
165
+ font-size: 18px;
166
+ }
167
+ .ons-autocomplete-wrapper :global(.autocomplete__hint),
168
+ .ons-autocomplete-wrapper :global(.autocomplete__input) {
169
+ height: 40px;
161
170
  }</style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onsvisual/svelte-components",
3
- "version": "0.1.87",
3
+ "version": "0.1.88",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "homepage": "https://onsvisual.github.io/svelte-components",