@sveltia/ui 0.26.1 → 0.26.2
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/bottom-navigation/bottom-navigation.svelte +3 -0
- package/dist/components/listbox/listbox.svelte +5 -0
- package/dist/components/menu/menu.svelte +5 -0
- package/dist/components/select/combobox.svelte +5 -1
- package/dist/components/text-field/search-bar.svelte +1 -1
- package/dist/components/toolbar/toolbar.svelte +1 -1
- package/dist/components/util/app-shell.svelte +3 -3
- package/dist/styles/variables.scss +3 -3
- package/dist/typedefs.d.ts +5 -0
- package/dist/typedefs.js +2 -0
- package/package.json +1 -1
|
@@ -36,6 +36,9 @@
|
|
|
36
36
|
border-top-style: var(--sui-bottom-navigation-border-style, solid);
|
|
37
37
|
border-top-color: var(--sui-bottom-navigation-border-color, var(--sui-secondary-border-color));
|
|
38
38
|
}
|
|
39
|
+
.bottom-navigation:is([inert], [hidden]) {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
39
42
|
.bottom-navigation :global(.buttons) {
|
|
40
43
|
flex: auto;
|
|
41
44
|
display: flex;
|
|
@@ -103,6 +103,11 @@
|
|
|
103
103
|
font-size: var(--sui-control-font-size);
|
|
104
104
|
line-height: var(--sui-control-line-height);
|
|
105
105
|
}
|
|
106
|
+
@media (pointer: coarse) {
|
|
107
|
+
[role=listbox] {
|
|
108
|
+
gap: 8px 0;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
106
111
|
[role=listbox] :global([role="separator"]) {
|
|
107
112
|
margin: 4px 0;
|
|
108
113
|
background-color: var(--sui-control-border-color);
|
|
@@ -62,6 +62,11 @@
|
|
|
62
62
|
border-radius: var(--sui-menu-border-radius, 4px);
|
|
63
63
|
padding: var(--sui-menu-padding, 4px);
|
|
64
64
|
}
|
|
65
|
+
@media (pointer: coarse) {
|
|
66
|
+
.menu {
|
|
67
|
+
gap: 8px 0;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
65
70
|
.menu :global([role="separator"]) {
|
|
66
71
|
margin: var(--sui-menu-divider-margin, 4px);
|
|
67
72
|
background-color: var(--sui-menu-divider-color, var(--sui-control-border-color));
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
invalid = false,
|
|
34
34
|
editable = true,
|
|
35
35
|
position = 'bottom-left',
|
|
36
|
+
filterThreshold = 5,
|
|
36
37
|
children,
|
|
37
38
|
chevronIcon,
|
|
38
39
|
onChange,
|
|
@@ -197,7 +198,10 @@
|
|
|
197
198
|
touchOptimized={true}
|
|
198
199
|
bind:open={isPopupOpen}
|
|
199
200
|
onOpen={() => {
|
|
200
|
-
showFilter =
|
|
201
|
+
showFilter =
|
|
202
|
+
filterThreshold === -1
|
|
203
|
+
? false
|
|
204
|
+
: (popupContent?.querySelectorAll('[role="option"]')?.length ?? 0) > filterThreshold;
|
|
201
205
|
searchTerms = '';
|
|
202
206
|
}}
|
|
203
207
|
>
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
[role=toolbar] :global(h2):first-child {
|
|
92
92
|
padding-inline-start: 12px;
|
|
93
93
|
}
|
|
94
|
-
[role=toolbar] :global(h2) :global(span) {
|
|
94
|
+
[role=toolbar] :global(h2) :global(span:not(.sui.truncated-text)) {
|
|
95
95
|
font-size: var(--sui-font-size-small);
|
|
96
96
|
font-weight: var(--sui-font-weight-normal, normal);
|
|
97
97
|
opacity: 0.8;
|
|
@@ -258,9 +258,9 @@
|
|
|
258
258
|
@media (pointer: coarse) {
|
|
259
259
|
:global(:root),
|
|
260
260
|
:global(:host) {
|
|
261
|
-
--sui-control-small-height:
|
|
262
|
-
--sui-control-medium-height:
|
|
263
|
-
--sui-control-large-height:
|
|
261
|
+
--sui-control-small-height: 32px;
|
|
262
|
+
--sui-control-medium-height: 40px;
|
|
263
|
+
--sui-control-large-height: 48px;
|
|
264
264
|
--sui-checkbox-height: 24px;
|
|
265
265
|
--sui-secondary-row-height: 48px;
|
|
266
266
|
}
|
|
@@ -243,9 +243,9 @@
|
|
|
243
243
|
|
|
244
244
|
// Make controls larger on touch devices, e.g. mobile & tablet
|
|
245
245
|
@media (pointer: coarse) {
|
|
246
|
-
--sui-control-small-height:
|
|
247
|
-
--sui-control-medium-height:
|
|
248
|
-
--sui-control-large-height:
|
|
246
|
+
--sui-control-small-height: 32px;
|
|
247
|
+
--sui-control-medium-height: 40px;
|
|
248
|
+
--sui-control-large-height: 48px;
|
|
249
249
|
--sui-checkbox-height: 24px;
|
|
250
250
|
--sui-secondary-row-height: 48px;
|
|
251
251
|
}
|
package/dist/typedefs.d.ts
CHANGED
|
@@ -370,6 +370,11 @@ export type ComboboxProps = {
|
|
|
370
370
|
* Where to show the dropdown menu.
|
|
371
371
|
*/
|
|
372
372
|
position?: PopupPosition | undefined;
|
|
373
|
+
/**
|
|
374
|
+
* Number of items to start showing the filter. Default: `5`.
|
|
375
|
+
* Use `-1` to always hide the filter.
|
|
376
|
+
*/
|
|
377
|
+
filterThreshold?: number | undefined;
|
|
373
378
|
/**
|
|
374
379
|
* Primary slot content.
|
|
375
380
|
*/
|
package/dist/typedefs.js
CHANGED
|
@@ -127,6 +127,8 @@
|
|
|
127
127
|
* @property {string} [value] Selected option’s value.
|
|
128
128
|
* @property {boolean} [editable] Whether to make the `combobox` editable.
|
|
129
129
|
* @property {PopupPosition} [position] Where to show the dropdown menu.
|
|
130
|
+
* @property {number} [filterThreshold] Number of items to start showing the filter. Default: `5`.
|
|
131
|
+
* Use `-1` to always hide the filter.
|
|
130
132
|
* @property {Snippet} [children] Primary slot content.
|
|
131
133
|
* @property {Snippet} [chevronIcon] Chevron icon slot content.
|
|
132
134
|
* @property {(event: CustomEvent) => void} [onChange] Custom `change` event handler.
|