@likable-hair/svelte 3.1.20 → 3.1.22
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/layouts/UnstableDividedSideBarLayout.svelte +5 -0
- package/dist/components/simple/common/Menu.svelte +8 -2
- package/dist/components/simple/lists/SelectableVerticalList.svelte +6 -0
- package/dist/components/simple/lists/SelectableVerticalList.svelte.d.ts +1 -0
- package/dist/stores/layouts/unstableSidebarOpened.d.ts +2 -0
- package/dist/stores/layouts/unstableSidebarOpened.js +2 -0
- package/dist/utils/filters/builder.js +1 -1
- package/dist/utils/filters/modifiers/where.d.ts +2 -2
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ import Icon from "../simple/media/Icon.svelte";
|
|
|
5
5
|
import { createEventDispatcher } from "svelte";
|
|
6
6
|
import { clickOutside } from "../../utils/clickOutside";
|
|
7
7
|
import ColorInvertedSelector, {} from "../simple/lists/ColorInvertedSelector.svelte";
|
|
8
|
+
import { sidebarOpened } from "../../stores/layouts/unstableSidebarOpened";
|
|
8
9
|
let clazz = {};
|
|
9
10
|
export { clazz as class };
|
|
10
11
|
export let drawerOpened = false, expandOn = "hover", options = [], selectedIndex = void 0;
|
|
@@ -26,6 +27,8 @@ function handleMenuSelection(option) {
|
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
let sidebarExpanded = false;
|
|
30
|
+
$:
|
|
31
|
+
$sidebarOpened = sidebarExpanded;
|
|
29
32
|
</script>
|
|
30
33
|
|
|
31
34
|
<MediaQuery let:mAndDown>
|
|
@@ -63,6 +66,8 @@ let sidebarExpanded = false;
|
|
|
63
66
|
use:clickOutside
|
|
64
67
|
on:clickoutside={() => {if(expandOn == 'click') sidebarExpanded = false}}
|
|
65
68
|
class="side-bar {clazz.header || ''}"
|
|
69
|
+
role="presentation"
|
|
70
|
+
tabindex="-1"
|
|
66
71
|
>
|
|
67
72
|
<div class="side-bar-content">
|
|
68
73
|
<slot name="sidebar" hamburgerVisible={mAndDown} {sidebarExpanded}>
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
fly
|
|
4
4
|
} from "svelte/transition";
|
|
5
|
+
import { sidebarOpened } from "../../../stores/layouts/unstableSidebarOpened";
|
|
5
6
|
export let _top = void 0, _left = void 0, _width = "auto", _height = "auto", _maxHeight = void 0, _minWidth = void 0, _overflow = "auto", _boxShadow = void 0, _borderRadius = void 0, _activatorGap = 5;
|
|
6
7
|
export let open = false, refreshPosition = false, activator = void 0, anchor = "bottom", closeOnClickOutside = false, inAnimation = fly, inAnimationConfig = {
|
|
7
8
|
duration: 100,
|
|
@@ -209,7 +210,7 @@ function getParentInstanceFromViewport(activatorParent) {
|
|
|
209
210
|
}
|
|
210
211
|
return { top, left, fixedParent, validStickyParent: isStickyValid ? stickyParent : void 0 };
|
|
211
212
|
}
|
|
212
|
-
function
|
|
213
|
+
function refreshMenuPosition() {
|
|
213
214
|
if (open && !!menuElement && !!activator)
|
|
214
215
|
calculateMenuPosition({ menuElement, activator });
|
|
215
216
|
}
|
|
@@ -230,9 +231,12 @@ function handleMenuClick(e, zIndex2) {
|
|
|
230
231
|
}
|
|
231
232
|
});
|
|
232
233
|
}
|
|
234
|
+
$:
|
|
235
|
+
if ($sidebarOpened !== void 0)
|
|
236
|
+
setTimeout(refreshMenuPosition, 300);
|
|
233
237
|
</script>
|
|
234
238
|
|
|
235
|
-
<svelte:window on:scroll={
|
|
239
|
+
<svelte:window on:scroll={refreshMenuPosition} on:resize={refreshMenuPosition} ></svelte:window>
|
|
236
240
|
|
|
237
241
|
<div
|
|
238
242
|
class="controller"
|
|
@@ -242,6 +246,8 @@ function handleMenuClick(e, zIndex2) {
|
|
|
242
246
|
on:click={handleCloseControllerClick}
|
|
243
247
|
on:keypress={handleCloseControllerClick}
|
|
244
248
|
bind:this={closeController}
|
|
249
|
+
role="presentation"
|
|
250
|
+
tabindex="-1"
|
|
245
251
|
></div>
|
|
246
252
|
{#if open}
|
|
247
253
|
<div
|
|
@@ -70,6 +70,7 @@ function handleIconClick(index, element) {
|
|
|
70
70
|
class="element"
|
|
71
71
|
class:bicolor
|
|
72
72
|
class:focused={focused == element.name}
|
|
73
|
+
class:disabled={element.disabled}
|
|
73
74
|
aria-selected={selected == element.name}
|
|
74
75
|
on:mouseover={() => handleElementMouseover(element)}
|
|
75
76
|
on:focus={() => handleElementMouseover(element)}
|
|
@@ -246,6 +247,11 @@ function handleIconClick(index, element) {
|
|
|
246
247
|
)
|
|
247
248
|
}
|
|
248
249
|
|
|
250
|
+
.element.disabled {
|
|
251
|
+
pointer-events: none;
|
|
252
|
+
opacity: 0.5;
|
|
253
|
+
}
|
|
254
|
+
|
|
249
255
|
|
|
250
256
|
.centered {
|
|
251
257
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SelectModifier } from "./select";
|
|
2
2
|
export type WhereFilterValue = string | number | Date | boolean;
|
|
3
3
|
type GroupedWhere = {
|
|
4
4
|
method: 'where';
|
|
@@ -40,7 +40,7 @@ type InBuilderWhere = {
|
|
|
40
40
|
kind: 'inBuilder';
|
|
41
41
|
logicalOperator?: 'and' | 'or' | 'andNot' | 'orNot';
|
|
42
42
|
key: string;
|
|
43
|
-
|
|
43
|
+
children: (ObjectWhere | SimpleWhere | GroupedWhere | InWhere | ColumnWhere | JsonSupersetWhere | InBuilderWhere | NullWhere | SelectModifier)[];
|
|
44
44
|
};
|
|
45
45
|
type JsonSupersetWhere = {
|
|
46
46
|
method: 'where';
|