@ibobbyts/svelte-ui-utils 0.2.10 → 0.2.11
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/README.md
CHANGED
|
@@ -274,6 +274,11 @@ trigger's left edge; the default is `right` for backward compatibility.
|
|
|
274
274
|
longest option while keeping its left edge aligned. `DataTable` uses this same
|
|
275
275
|
component for its page-size picker.
|
|
276
276
|
|
|
277
|
+
The dropdown panel defaults to the viewport height (`100vh`) and remains
|
|
278
|
+
scrollable when its contents exceed that height. When `fitViewport` is enabled,
|
|
279
|
+
the component replaces that default with the space available above or below the
|
|
280
|
+
trigger.
|
|
281
|
+
|
|
277
282
|
## DataTable
|
|
278
283
|
|
|
279
284
|
```svelte
|
|
@@ -403,6 +408,9 @@ for the left column and a controlled filter created with the `filter` helper:
|
|
|
403
408
|
<FilterTable rows={filterRows} language="en_us" />
|
|
404
409
|
```
|
|
405
410
|
|
|
411
|
+
`filter.select` uses the shared `Dropdown` component, so select filters keep the
|
|
412
|
+
same menu, keyboard, and visual behavior as standalone dropdowns.
|
|
413
|
+
|
|
406
414
|
If a dropdown-style filter appears clipped, check the parent containers first.
|
|
407
415
|
`DropdownSearch` renders its result list as an absolutely positioned child, so
|
|
408
416
|
any ancestor with `overflow: hidden`, `overflow: auto`, or `overflow: scroll`
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<svelte:options runes={false} />
|
|
2
2
|
|
|
3
3
|
<script lang="ts">
|
|
4
|
+
import Dropdown from '../dropdown/Dropdown.svelte';
|
|
4
5
|
import DropdownSearch from '../dropdown-search/DropdownSearch.svelte';
|
|
5
6
|
import type { UiLanguage } from '../i18n.js';
|
|
6
7
|
import DateRangeFilter from './DateRangeFilter.svelte';
|
|
@@ -30,11 +31,6 @@
|
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
function runSelect(event: Event) {
|
|
34
|
-
if (control.type === 'select') {
|
|
35
|
-
void control.onChange((event.currentTarget as HTMLSelectElement).value);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
34
|
</script>
|
|
39
35
|
|
|
40
36
|
{#if control.type === 'container'}
|
|
@@ -184,9 +180,15 @@
|
|
|
184
180
|
<span>{control.label}</span>
|
|
185
181
|
</a>
|
|
186
182
|
{:else if control.type === 'select'}
|
|
187
|
-
<
|
|
188
|
-
{
|
|
189
|
-
|
|
190
|
-
{
|
|
191
|
-
|
|
183
|
+
<Dropdown
|
|
184
|
+
value={control.value}
|
|
185
|
+
options={control.options}
|
|
186
|
+
ariaLabel={control.ariaLabel}
|
|
187
|
+
fitContent
|
|
188
|
+
onChange={(value) => {
|
|
189
|
+
if (control.type === 'select') {
|
|
190
|
+
void control.onChange(String(value));
|
|
191
|
+
}
|
|
192
|
+
}}
|
|
193
|
+
/>
|
|
192
194
|
{/if}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterControl.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/data-table/FilterControl.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilterControl.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/data-table/FilterControl.svelte.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAwIhD,QAAA,MAAM,aAAa,KAA+E,CAAC;AACjF,KAAK,aAAa,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,eAAe,aAAa,CAAC"}
|
package/dist/style.css
CHANGED
|
@@ -1202,7 +1202,7 @@
|
|
|
1202
1202
|
}
|
|
1203
1203
|
|
|
1204
1204
|
.suu-dropdown__panel {
|
|
1205
|
-
max-height: var(--suu-dropdown-panel-max-height,
|
|
1205
|
+
max-height: var(--suu-dropdown-panel-max-height, 100vh);
|
|
1206
1206
|
overflow-y: auto;
|
|
1207
1207
|
background: var(--suu-color-bg);
|
|
1208
1208
|
overscroll-behavior: contain;
|
package/package.json
CHANGED