@likable-hair/svelte 3.0.28 → 3.0.30

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.
@@ -0,0 +1,277 @@
1
+ <script>import "/node_modules/flag-icons/css/flag-icons.min.css";
2
+ import Autocomplete, {
3
+ } from "../../simple/forms/Autocomplete.svelte";
4
+ export let autocompleteProps = {};
5
+ let items = [
6
+ { value: "AD", label: "Andorra" },
7
+ { value: "AE", label: "United Arab Emirates" },
8
+ { value: "AF", label: "Afghanistan" },
9
+ { value: "AG", label: "Antigua and Barbuda" },
10
+ { value: "AI", label: "Anguilla" },
11
+ { value: "AL", label: "Albania" },
12
+ { value: "AM", label: "Armenia" },
13
+ { value: "AO", label: "Angola" },
14
+ { value: "AQ", label: "Antarctica" },
15
+ { value: "AR", label: "Argentina" },
16
+ { value: "AS", label: "American Samoa" },
17
+ { value: "AT", label: "Austria" },
18
+ { value: "AU", label: "Australia" },
19
+ { value: "AW", label: "Aruba" },
20
+ { value: "AX", label: "\xC5land Islands" },
21
+ { value: "AZ", label: "Azerbaijan" },
22
+ { value: "BA", label: "Bosnia and Herzegovina" },
23
+ { value: "BB", label: "Barbados" },
24
+ { value: "BD", label: "Bangladesh" },
25
+ { value: "BE", label: "Belgium" },
26
+ { value: "BF", label: "Burkina Faso" },
27
+ { value: "BG", label: "Bulgaria" },
28
+ { value: "BH", label: "Bahrain" },
29
+ { value: "BI", label: "Burundi" },
30
+ { value: "BJ", label: "Benin" },
31
+ { value: "BL", label: "Saint Barth\xE9lemy" },
32
+ { value: "BM", label: "Bermuda" },
33
+ { value: "BN", label: "Brunei Darussalam" },
34
+ { value: "BO", label: "Bolivia" },
35
+ { value: "BQ", label: "Bonaire, Sint Eustatius and Saba" },
36
+ { value: "BR", label: "Brazil" },
37
+ { value: "BS", label: "Bahamas" },
38
+ { value: "BT", label: "Bhutan" },
39
+ { value: "BV", label: "Bouvet Island" },
40
+ { value: "BW", label: "Botswana" },
41
+ { value: "BY", label: "Belarus" },
42
+ { value: "BZ", label: "Belize" },
43
+ { value: "CA", label: "Canada" },
44
+ { value: "CC", label: "Cocos (Keeling) Islands" },
45
+ { value: "CD", label: "Congo, Democratic Republic" },
46
+ { value: "CF", label: "Central African Republic" },
47
+ { value: "CG", label: "Congo" },
48
+ { value: "CH", label: "Switzerland" },
49
+ { value: "CI", label: "C\xF4te d'Ivoire" },
50
+ { value: "CK", label: "Cook Islands" },
51
+ { value: "CL", label: "Chile" },
52
+ { value: "CM", label: "Cameroon" },
53
+ { value: "CN", label: "China" },
54
+ { value: "CO", label: "Colombia" },
55
+ { value: "CR", label: "Costa Rica" },
56
+ { value: "CU", label: "Cuba" },
57
+ { value: "CV", label: "Cabo Verde" },
58
+ { value: "CW", label: "Cura\xE7ao" },
59
+ { value: "CX", label: "Christmas Island" },
60
+ { value: "CY", label: "Cyprus" },
61
+ { value: "CZ", label: "Czech Republic" },
62
+ { value: "DE", label: "Germany" },
63
+ { value: "DJ", label: "Djibouti" },
64
+ { value: "DK", label: "Denmark" },
65
+ { value: "DM", label: "Dominica" },
66
+ { value: "DO", label: "Dominican Republic" },
67
+ { value: "DZ", label: "Algeria" },
68
+ { value: "EC", label: "Ecuador" },
69
+ { value: "EE", label: "Estonia" },
70
+ { value: "EG", label: "Egypt" },
71
+ { value: "EH", label: "Western Sahara" },
72
+ { value: "ER", label: "Eritrea" },
73
+ { value: "ES", label: "Spain" },
74
+ { value: "ET", label: "Ethiopia" },
75
+ { value: "FI", label: "Finland" },
76
+ { value: "FJ", label: "Fiji" },
77
+ { value: "FK", label: "Falkland Islands (Malvinas)" },
78
+ { value: "FM", label: "Micronesia, Federated States of" },
79
+ { value: "FO", label: "Faroe Islands" },
80
+ { value: "FR", label: "France" },
81
+ { value: "GA", label: "Gabon" },
82
+ { value: "GB", label: "United Kingdom" },
83
+ { value: "GD", label: "Grenada" },
84
+ { value: "GE", label: "Georgia" },
85
+ { value: "GF", label: "French Guiana" },
86
+ { value: "GG", label: "Guernsey" },
87
+ { value: "GH", label: "Ghana" },
88
+ { value: "GI", label: "Gibraltar" },
89
+ { value: "GL", label: "Greenland" },
90
+ { value: "GM", label: "Gambia" },
91
+ { value: "GN", label: "Guinea" },
92
+ { value: "GP", label: "Guadeloupe" },
93
+ { value: "GQ", label: "Equatorial Guinea" },
94
+ { value: "GR", label: "Greece" },
95
+ { value: "GS", label: "South Georgia and the South Sandwich Islands" },
96
+ { value: "GT", label: "Guatemala" },
97
+ { value: "GU", label: "Guam" },
98
+ { value: "GW", label: "Guinea-Bissau" },
99
+ { value: "GY", label: "Guyana" },
100
+ { value: "HK", label: "Hong Kong" },
101
+ { value: "HM", label: "Heard Island and McDonald Islands" },
102
+ { value: "HN", label: "Honduras" },
103
+ { value: "HR", label: "Croatia" },
104
+ { value: "HT", label: "Haiti" },
105
+ { value: "HU", label: "Hungary" },
106
+ { value: "ID", label: "Indonesia" },
107
+ { value: "IE", label: "Ireland" },
108
+ { value: "IL", label: "Israel" },
109
+ { value: "IM", label: "Isle of Man" },
110
+ { value: "IN", label: "India" },
111
+ { value: "IO", label: "British Indian Ocean Territory" },
112
+ { value: "IQ", label: "Iraq" },
113
+ { value: "IR", label: "Iran, Islamic Republic of" },
114
+ { value: "IS", label: "Iceland" },
115
+ { value: "IT", label: "Italy" },
116
+ { value: "JE", label: "Jersey" },
117
+ { value: "JM", label: "Jamaica" },
118
+ { value: "JO", label: "Jordan" },
119
+ { value: "JP", label: "Japan" },
120
+ { value: "KE", label: "Kenya" },
121
+ { value: "KG", label: "Kyrgyzstan" },
122
+ { value: "KH", label: "Cambodia" },
123
+ { value: "KI", label: "Kiribati" },
124
+ { value: "KM", label: "Comoros" },
125
+ { value: "KN", label: "Saint Kitts and Nevis" },
126
+ { value: "KP", label: "Korea (Democratic People's Republic of)" },
127
+ { value: "KR", label: "Korea, Republic of" },
128
+ { value: "KW", label: "Kuwait" },
129
+ { value: "KY", label: "Cayman Islands" },
130
+ { value: "KZ", label: "Kazakhstan" },
131
+ { value: "LA", label: "Lao People's Democratic Republic" },
132
+ { value: "LB", label: "Lebanon" },
133
+ { value: "LC", label: "Saint Lucia" },
134
+ { value: "LI", label: "Liechtenstein" },
135
+ { value: "LK", label: "Sri Lanka" },
136
+ { value: "LR", label: "Liberia" },
137
+ { value: "LS", label: "Lesotho" },
138
+ { value: "LT", label: "Lithuania" },
139
+ { value: "LU", label: "Luxembourg" },
140
+ { value: "LV", label: "Latvia" },
141
+ { value: "LY", label: "Libya" },
142
+ { value: "MA", label: "Morocco" },
143
+ { value: "MC", label: "Monaco" },
144
+ { value: "MD", label: "Moldova, Republic of" },
145
+ { value: "ME", label: "Montenegro" },
146
+ { value: "MF", label: "Saint Martin" },
147
+ { value: "MG", label: "Madagascar" },
148
+ { value: "MH", label: "Marshall Islands" },
149
+ { value: "MK", label: "North Macedonia" },
150
+ { value: "ML", label: "Mali" },
151
+ { value: "MM", label: "Myanmar" },
152
+ { value: "MN", label: "Mongolia" },
153
+ { value: "MO", label: "Macao" },
154
+ { value: "MP", label: "Northern Mariana Islands" },
155
+ { value: "MQ", label: "Martinique" },
156
+ { value: "MR", label: "Mauritania" },
157
+ { value: "MS", label: "Montserrat" },
158
+ { value: "MT", label: "Malta" },
159
+ { value: "MU", label: "Mauritius" },
160
+ { value: "MV", label: "Maldives" },
161
+ { value: "MW", label: "Malawi" },
162
+ { value: "MX", label: "Mexico" },
163
+ { value: "MY", label: "Malaysia" },
164
+ { value: "MZ", label: "Mozambique" },
165
+ { value: "NA", label: "Namibia" },
166
+ { value: "NC", label: "New Caledonia" },
167
+ { value: "NE", label: "Niger" },
168
+ { value: "NF", label: "Norfolk Island" },
169
+ { value: "NG", label: "Nigeria" },
170
+ { value: "NI", label: "Nicaragua" },
171
+ { value: "NL", label: "Netherlands" },
172
+ { value: "NO", label: "Norway" },
173
+ { value: "NP", label: "Nepal" },
174
+ { value: "NR", label: "Nauru" },
175
+ { value: "NU", label: "Niue" },
176
+ { value: "NZ", label: "New Zealand" },
177
+ { value: "OM", label: "Oman" },
178
+ { value: "PA", label: "Panama" },
179
+ { value: "PE", label: "Peru" },
180
+ { value: "PF", label: "French Polynesia" },
181
+ { value: "PG", label: "Papua New Guinea" },
182
+ { value: "PH", label: "Philippines" },
183
+ { value: "PK", label: "Pakistan" },
184
+ { value: "PL", label: "Poland" },
185
+ { value: "PM", label: "Saint Pierre and Miquelon" },
186
+ { value: "PN", label: "Pitcairn" },
187
+ { value: "PR", label: "Puerto Rico" },
188
+ { value: "PS", label: "Palestine, State of" },
189
+ { value: "PT", label: "Portugal" },
190
+ { value: "PW", label: "Palau" },
191
+ { value: "PY", label: "Paraguay" },
192
+ { value: "QA", label: "Qatar" },
193
+ { value: "RE", label: "R\xE9union" },
194
+ { value: "RO", label: "Romania" },
195
+ { value: "RS", label: "Serbia" },
196
+ { value: "RU", label: "Russian Federation" },
197
+ { value: "RW", label: "Rwanda" },
198
+ { value: "SA", label: "Saudi Arabia" },
199
+ { value: "SB", label: "Solomon Islands" },
200
+ { value: "SC", label: "Seychelles" },
201
+ { value: "SD", label: "Sudan" },
202
+ { value: "SE", label: "Sweden" },
203
+ { value: "SG", label: "Singapore" },
204
+ { value: "SH", label: "Saint Helena, Ascension and Tristan da Cunha" },
205
+ { value: "SI", label: "Slovenia" },
206
+ { value: "SJ", label: "Svalbard and Jan Mayen" },
207
+ { value: "SK", label: "Slovakia" },
208
+ { value: "SL", label: "Sierra Leone" },
209
+ { value: "SM", label: "San Marino" },
210
+ { value: "SN", label: "Senegal" },
211
+ { value: "SO", label: "Somalia" },
212
+ { value: "SR", label: "Surilabel" },
213
+ { value: "SS", label: "South Sudan" },
214
+ { value: "ST", label: "Sao Tome and Principe" },
215
+ { value: "SV", label: "El Salvador" },
216
+ { value: "SX", label: "Sint Maarten, Dutch part" },
217
+ { value: "SY", label: "Syrian Arab Republic" },
218
+ { value: "SZ", label: "Eswatini" },
219
+ { value: "TC", label: "Turks and Caicos Islands" },
220
+ { value: "TD", label: "Chad" },
221
+ { value: "TF", label: "French Southern Territories" },
222
+ { value: "TG", label: "Togo" },
223
+ { value: "TH", label: "Thailand" },
224
+ { value: "TJ", label: "Tajikistan" },
225
+ { value: "TK", label: "Tokelau" },
226
+ { value: "TL", label: "Timor-Leste" },
227
+ { value: "TM", label: "Turkmenistan" },
228
+ { value: "TN", label: "Tunisia" },
229
+ { value: "TO", label: "Tonga" },
230
+ { value: "TR", label: "T\xFCrkiye" },
231
+ { value: "TT", label: "Trinidad and Tobago" },
232
+ { value: "TV", label: "Tuvalu" },
233
+ { value: "TW", label: "Taiwan, Province of China" },
234
+ { value: "TZ", label: "Tanzania, United Republic of" },
235
+ { value: "UA", label: "Ukraine" },
236
+ { value: "UG", label: "Uganda" },
237
+ { value: "UM", label: "United States Minor Outlying Islands" },
238
+ { value: "US", label: "United States of America" },
239
+ { value: "UY", label: "Uruguay" },
240
+ { value: "UZ", label: "Uzbekistan" },
241
+ { value: "VA", label: "Holy See (Vatican City State)" },
242
+ { value: "VC", label: "Saint Vincent and the Grenadines" },
243
+ { value: "VE", label: "Venezuela, Bolivarian Republic of" },
244
+ { value: "VG", label: "Virgin Islands, British" },
245
+ { value: "VI", label: "Virgin Islands, U.S." },
246
+ { value: "VN", label: "Vietnam" },
247
+ { value: "VU", label: "Vanuatu" },
248
+ { value: "WF", label: "Wallis and Futuna" },
249
+ { value: "WS", label: "Samoa" },
250
+ { value: "YE", label: "Yemen" },
251
+ { value: "YT", label: "Mayotte" },
252
+ { value: "ZA", label: "South Africa" },
253
+ { value: "ZM", label: "Zambia" },
254
+ { value: "ZW", label: "Zimbabwe" }
255
+ ];
256
+ </script>
257
+
258
+ <Autocomplete
259
+ items={items}
260
+ {...autocompleteProps}
261
+ >
262
+ <svelte:fragment slot="chip-label" let:selection>
263
+ <span class="fi fi-{selection.value.toString().toLowerCase()} fis"></span>
264
+ {selection.label}
265
+ </svelte:fragment>
266
+ <svelte:fragment slot="item-label" let:item>
267
+ <span class="fi fi-{item.value.toString().toLowerCase()} fis"></span>
268
+ {item.label}
269
+ </svelte:fragment>
270
+ </Autocomplete>
271
+
272
+ <style>
273
+ .fis {
274
+ border-radius: 4px;
275
+ font-size: 1.2rem;
276
+ }
277
+ </style>
@@ -0,0 +1,40 @@
1
+ import { SvelteComponentTyped } from "svelte";
2
+ import "/node_modules/flag-icons/css/flag-icons.min.css";
3
+ import { type Item } from "../../simple/forms/Autocomplete.svelte";
4
+ declare const __propDef: {
5
+ props: {
6
+ autocompleteProps?: Omit<{
7
+ class?: {
8
+ activator?: string | undefined;
9
+ menu?: string | undefined;
10
+ } | undefined;
11
+ values?: Item[] | undefined;
12
+ items: Item[];
13
+ searchFunction?: ((item: Item, searchText: string | undefined) => boolean) | undefined;
14
+ multiple?: boolean | undefined;
15
+ disabled?: boolean | undefined;
16
+ mandatory?: boolean | undefined;
17
+ placeholder?: string | undefined;
18
+ width?: string | undefined;
19
+ height?: string | undefined;
20
+ maxWidth?: string | undefined;
21
+ openingId?: string | undefined;
22
+ searchText?: string | undefined;
23
+ maxVisibleChips?: number | undefined;
24
+ menuOpened?: boolean | undefined;
25
+ menuBoxShadow?: string | undefined;
26
+ menuBorderRadius?: string | undefined;
27
+ mobileDrawer?: boolean | undefined;
28
+ }, "items"> | undefined;
29
+ };
30
+ events: {
31
+ [evt: string]: CustomEvent<any>;
32
+ };
33
+ slots: {};
34
+ };
35
+ export type CountriesAutocompleteProps = typeof __propDef.props;
36
+ export type CountriesAutocompleteEvents = typeof __propDef.events;
37
+ export type CountriesAutocompleteSlots = typeof __propDef.slots;
38
+ export default class CountriesAutocomplete extends SvelteComponentTyped<CountriesAutocompleteProps, CountriesAutocompleteEvents, CountriesAutocompleteSlots> {
39
+ }
40
+ export {};
@@ -8,4 +8,5 @@
8
8
  --global-search-text-field-default-background-color: rgb(var(--global-color-background-100));
9
9
  --global-search-text-field-default-padding: 0rem 0.75rem 0rem 0.5rem;
10
10
  --global-search-text-field-default-font-size: .875rem;
11
+ --global-search-text-field-default-border-radius: 9999px;
11
12
  }
@@ -163,7 +163,10 @@ async function search() {
163
163
  --global-search-text-field-background-color,
164
164
  var(--global-search-text-field-default-background-color)
165
165
  );
166
- border-radius: 9999px;
166
+ border-radius: var(
167
+ --global-search-text-field-border-radius,
168
+ var(--global-search-text-field-default-border-radius)
169
+ );
167
170
  padding: var(
168
171
  --global-search-text-field-padding,
169
172
  var(--global-search-text-field-default-padding)
@@ -58,8 +58,8 @@ let sidebarExpanded = false;
58
58
  class:opened={(mAndDown && drawerOpened) || sidebarExpanded}
59
59
  on:mouseleave={() => {if(expandOn == 'hover') sidebarExpanded = false}}
60
60
  on:mouseenter={() => {if(expandOn == 'hover') sidebarExpanded = true}}
61
- on:click={() => {if(expandOn == 'click') sidebarExpanded = true}}
62
- on:keypress={() => {if(expandOn == 'click') sidebarExpanded = true}}
61
+ on:click={() => {if(expandOn == 'click' && !mAndDown) sidebarExpanded = true}}
62
+ on:keypress={() => {if(expandOn == 'click' && !mAndDown) sidebarExpanded = true}}
63
63
  use:clickOutside
64
64
  on:clickoutside={() => {if(expandOn == 'click') sidebarExpanded = false}}
65
65
  class="side-bar {clazz.header}"
@@ -1,4 +1,4 @@
1
- <script>export let outlined = false, maxWidth = void 0, maxHeight = void 0, minWidth = void 0, minHeight = void 0, width = "fit-content", height = void 0, padding = "5px", borderRadius = "5px", backgroundColor = "rgb(252, 252, 252)", color = void 0, borderColor = void 0, borderWidth = void 0, marginBottom = void 0, marginTop = void 0, marginLeft = void 0, marginRight = void 0, boxShadow = "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
1
+ <script>export let outlined = false, maxWidth = void 0, maxHeight = void 0, minWidth = void 0, minHeight = void 0, width = "fit-content", height = void 0, padding = "5px", borderRadius = "5px", backgroundColor = "rgb(var(--global-color-background-200))", color = void 0, borderColor = void 0, borderWidth = void 0, marginBottom = void 0, marginTop = void 0, marginLeft = void 0, marginRight = void 0, boxShadow = "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)";
2
2
  </script>
3
3
 
4
4
  <div
@@ -17,15 +17,17 @@ function calculateMenuPosition(params) {
17
17
  if (anchor == "bottom") {
18
18
  let { left: activatorLeft, top: activatorTop } = params.activator.getBoundingClientRect();
19
19
  let activatorHeight = params.activator.offsetHeight;
20
- _top = activatorTop + window.scrollY + activatorHeight + _activatorGap;
21
- _left = activatorLeft + window.scrollX;
20
+ let { top: fixedParentTop, left: fixedParentLeft } = getParentInstanceFromViewport(activator?.parentElement);
21
+ _top = activatorTop + window.scrollY + activatorHeight + _activatorGap - fixedParentTop;
22
+ _left = activatorLeft + window.scrollX - fixedParentLeft;
22
23
  } else if (anchor == "bottom-center") {
23
24
  let { left: activatorLeft, top: activatorTop } = params.activator.getBoundingClientRect();
24
25
  let activatorHeight = params.activator.offsetHeight;
25
26
  let activatorWidth = params.activator.offsetWidth;
26
27
  let menuWidth = params.menuElement.offsetWidth;
27
- _top = activatorTop + window.scrollY + activatorHeight + _activatorGap;
28
- _left = activatorLeft + window.scrollX;
28
+ let { top: fixedParentTop, left: fixedParentLeft } = getParentInstanceFromViewport(activator?.parentElement);
29
+ _top = activatorTop + window.scrollY + activatorHeight + _activatorGap - fixedParentTop;
30
+ _left = activatorLeft + window.scrollX - fixedParentLeft;
29
31
  if (menuWidth > activatorWidth) {
30
32
  _left = _left - (menuWidth - activatorWidth) / 2;
31
33
  } else {
@@ -35,10 +37,10 @@ function calculateMenuPosition(params) {
35
37
  let { left: activatorLeft, top: activatorTop } = params.activator.getBoundingClientRect();
36
38
  let activatorHeight = params.activator.offsetHeight;
37
39
  let activatorWidth = params.activator.offsetWidth;
38
- let menuWidth = params.menuElement.offsetWidth;
39
40
  let menuHeight = params.menuElement.offsetHeight;
40
- _top = activatorTop + window.scrollY + activatorHeight / 2 - menuHeight / 2;
41
- _left = activatorLeft + window.scrollX + activatorWidth + _activatorGap;
41
+ let { top: fixedParentTop, left: fixedParentLeft } = getParentInstanceFromViewport(activator?.parentElement);
42
+ _top = activatorTop + window.scrollY + activatorHeight / 2 - menuHeight / 2 - fixedParentTop;
43
+ _left = activatorLeft + window.scrollX + activatorWidth + _activatorGap - fixedParentLeft;
42
44
  }
43
45
  }
44
46
  if (flipOnOverflow && !!params.activator) {
@@ -154,6 +156,25 @@ function getPositionedAncestor(elem) {
154
156
  function handleCloseControllerClick() {
155
157
  open = false;
156
158
  }
159
+ function getParentInstanceFromViewport(activatorParent) {
160
+ let top = 0;
161
+ let left = 0;
162
+ while (!!activatorParent && activatorParent.nodeName.toLowerCase() !== "html" && activatorParent.nodeName.toLowerCase() !== "body") {
163
+ const currentParent = activatorParent.parentElement;
164
+ if (!currentParent)
165
+ break;
166
+ const computedStyle = getComputedStyle(currentParent);
167
+ const position = computedStyle.position;
168
+ const display = computedStyle.display;
169
+ if ((position === "fixed" || position === "absolute") && display === "flex") {
170
+ const boundingClientRect = activatorParent.getBoundingClientRect();
171
+ top = top + boundingClientRect.top;
172
+ left = left + boundingClientRect.left;
173
+ }
174
+ activatorParent = activatorParent.parentElement;
175
+ }
176
+ return { top, left };
177
+ }
157
178
  function handleWindowScrollOrResize() {
158
179
  if (open && !!menuElement && !!activator)
159
180
  calculateMenuPosition({ menuElement, activator });
@@ -158,7 +158,9 @@ import MenuOrDrawer from "../../composed/common/MenuOrDrawer.svelte";
158
158
  buttonTabIndex={-1}
159
159
  truncateText
160
160
  >
161
- {selection.label}
161
+ <slot name="chip-label" {selection}>
162
+ {selection.label}
163
+ </slot>
162
164
  </Chip>
163
165
  </div>
164
166
  </slot>
@@ -231,7 +233,9 @@ import MenuOrDrawer from "../../composed/common/MenuOrDrawer.svelte";
231
233
  on:click={() => toggle(item)}
232
234
  on:keypress={() => toggle(item)}
233
235
  >
234
- {item.label}
236
+ <slot name="item-label" {item}>
237
+ {item.label}
238
+ </slot>
235
239
  </div>
236
240
  </slot>
237
241
  </li>
@@ -271,7 +275,9 @@ import MenuOrDrawer from "../../composed/common/MenuOrDrawer.svelte";
271
275
  on:click={() => toggle(item)}
272
276
  on:keypress={() => toggle(item)}
273
277
  >
274
- {item.label}
278
+ <slot name="item-label" {item}>
279
+ {item.label}
280
+ </slot>
275
281
  </div>
276
282
  </slot>
277
283
  </li>
@@ -51,6 +51,9 @@ declare const __propDef: {
51
51
  selection: {
52
52
  selection: Item;
53
53
  };
54
+ 'chip-label': {
55
+ selection: Item;
56
+ };
54
57
  exceedCounter: {
55
58
  notVisibleChipNumber: number;
56
59
  maxVisibleChips: number | undefined;
@@ -64,6 +67,9 @@ declare const __propDef: {
64
67
  index: any;
65
68
  selected: boolean;
66
69
  };
70
+ 'item-label': {
71
+ item: Item;
72
+ };
67
73
  };
68
74
  };
69
75
  export type AutocompleteProps = typeof __propDef.props;
@@ -8,10 +8,11 @@ let clazz = {};
8
8
  export { clazz as class };
9
9
  let dispatch = createEventDispatcher();
10
10
  export let options, selectedIndex, deletable = true;
11
- function handleOptionClick(option, index) {
11
+ function handleOptionClick(option, index, e) {
12
12
  dispatch("select", {
13
13
  option,
14
- selectedIndex
14
+ selectedIndex,
15
+ native: e
15
16
  });
16
17
  selectedIndex = index;
17
18
  }
@@ -32,7 +33,7 @@ function handleClickClose(option, index) {
32
33
  <button
33
34
  class:selected={selectedIndex == index}
34
35
  class="element {clazz?.element || ''} {selectedIndex == index ? clazz.selected : ''}"
35
- on:click={() => handleOptionClick(option, index)}
36
+ on:click={(e) => handleOptionClick(option, index, e)}
36
37
  on:keydown={() => { }}
37
38
  >
38
39
  <div class="icon-and-title">
@@ -21,6 +21,7 @@ declare const __propDef: {
21
21
  select: CustomEvent<{
22
22
  option: Option;
23
23
  selectedIndex: number | undefined;
24
+ native: Event;
24
25
  }>;
25
26
  delete: CustomEvent<{
26
27
  option: Option;
package/dist/index.d.ts CHANGED
@@ -47,9 +47,11 @@ export { default as ProductCard } from './components/composed/shop/ProductCard.s
47
47
  export { default as ProductsGrid } from './components/composed/shop/ProductsGrid.svelte';
48
48
  export { default as PaginatedTable } from './components/composed/list/PaginatedTable.svelte';
49
49
  export { default as Filters } from './components/composed/search/Filters.svelte';
50
+ export { default as GlobalSearchTextField } from './components/composed/search/GlobalSearchTextField.svelte';
50
51
  export { default as mediaQuery } from './stores/mediaQuery';
51
52
  export { default as theme, toggleTheme, setTheme } from './stores/theme';
52
53
  export { default as SimpleTimeLine } from './components/simple/timeline/SimpleTimeLine.svelte';
53
54
  export { default as CollapsibleSideBarLayout } from './components/layouts/CollapsibleSideBarLayout.svelte';
54
55
  export { default as StableDividedSideBarLayout } from './components/layouts/StableDividedSideBarLayout.svelte';
55
56
  export { default as UnstableDividedSideBarLayout } from './components/layouts/UnstableDividedSideBarLayout.svelte';
57
+ export { default as Converter } from './utils/filters/filters';
package/dist/index.js CHANGED
@@ -47,9 +47,11 @@ export { default as ProductCard } from './components/composed/shop/ProductCard.s
47
47
  export { default as ProductsGrid } from './components/composed/shop/ProductsGrid.svelte';
48
48
  export { default as PaginatedTable } from './components/composed/list/PaginatedTable.svelte';
49
49
  export { default as Filters } from './components/composed/search/Filters.svelte';
50
+ export { default as GlobalSearchTextField } from './components/composed/search/GlobalSearchTextField.svelte';
50
51
  export { default as mediaQuery } from './stores/mediaQuery';
51
52
  export { default as theme, toggleTheme, setTheme } from './stores/theme';
52
53
  export { default as SimpleTimeLine } from './components/simple/timeline/SimpleTimeLine.svelte';
53
54
  export { default as CollapsibleSideBarLayout } from './components/layouts/CollapsibleSideBarLayout.svelte';
54
55
  export { default as StableDividedSideBarLayout } from './components/layouts/StableDividedSideBarLayout.svelte';
55
56
  export { default as UnstableDividedSideBarLayout } from './components/layouts/UnstableDividedSideBarLayout.svelte';
57
+ export { default as Converter } from './utils/filters/filters';
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.28",
4
+ "version": "3.0.30",
5
5
  "scripts": {
6
6
  "host": "vite --host",
7
7
  "dev": "vite dev",
@@ -59,6 +59,7 @@
59
59
  "dependencies": {
60
60
  "@paralleldrive/cuid2": "^2.2.0",
61
61
  "esm-env": "^1.0.0",
62
+ "flag-icons": "^6.11.1",
62
63
  "highlight.js": "^11.7.0",
63
64
  "highlightjs-svelte": "^1.0.6",
64
65
  "imask": "^7.1.0-alpha.0",