@likable-hair/svelte 3.1.21 → 3.1.23

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.
@@ -2,7 +2,7 @@
2
2
  import Drawer from "../../simple/navigation/Drawer.svelte";
3
3
  import Menu from "../../simple/common/Menu.svelte";
4
4
  import MediaQuery from "../../simple/common/MediaQuery.svelte";
5
- export let open = false, activator, drawerPosition = "bottom", menuAnchor = "bottom-center", stayInViewport = true, flipOnOverflow = false, _boxShadow = "rgb(var(--global-color-grey-900), .5) 0px 2px 4px", _height = "fit-content", _width = void 0, _maxHeight = void 0, _minWidth = "100px", _borderRadius = "5px";
5
+ export let open = false, activator, drawerPosition = "bottom", menuAnchor = "bottom-center", stayInViewport = true, flipOnOverflow = false, _boxShadow = "rgb(var(--global-color-grey-900), .5) 0px 2px 4px", _height = "fit-content", _width = void 0, _maxHeight = void 0, _minWidth = "100px", _borderRadius = "5px", openingId = void 0;
6
6
  </script>
7
7
 
8
8
  <MediaQuery let:mAndDown>
@@ -29,6 +29,7 @@ export let open = false, activator, drawerPosition = "bottom", menuAnchor = "bot
29
29
  anchor={menuAnchor}
30
30
  bind:stayInViewport={stayInViewport}
31
31
  bind:flipOnOverflow={flipOnOverflow}
32
+ bind:openingId
32
33
  >
33
34
  <slot isDrawer={false} isMenu={true}></slot>
34
35
  </Menu>
@@ -17,6 +17,7 @@ declare const __propDef: {
17
17
  _maxHeight?: string | undefined;
18
18
  _minWidth?: string | undefined;
19
19
  _borderRadius?: string | undefined;
20
+ openingId?: ComponentProps<Menu>['openingId'];
20
21
  };
21
22
  events: {
22
23
  close: CustomEvent<{}>;
@@ -3,7 +3,7 @@
3
3
  <script>import "../../../css/main.css";
4
4
  import MenuOrDrawer from "./MenuOrDrawer.svelte";
5
5
  import SelectableVerticalList from "../../simple/lists/SelectableVerticalList.svelte";
6
- export let open = false, activator, drawerPosition = "bottom", menuAnchor = "bottom-center", elements = [], stayInViewport = true, flipOnOverflow = false, _boxShadow = "rgb(var(--global-color-grey-900), .5) 0px 2px 4px", _height = "fit-content", _maxHeight = void 0, _minWidth = "100px", _borderRadius = "5px";
6
+ export let open = false, activator, drawerPosition = "bottom", menuAnchor = "bottom-center", elements = [], stayInViewport = true, flipOnOverflow = false, _boxShadow = "rgb(var(--global-color-grey-900), .5) 0px 2px 4px", _height = "fit-content", _maxHeight = void 0, _minWidth = "100px", _borderRadius = "5px", openingId = void 0;
7
7
  let selected;
8
8
  let focused;
9
9
  $:
@@ -28,6 +28,7 @@ $:
28
28
  {_borderRadius}
29
29
  let:isDrawer
30
30
  --drawer-default-space={`${Math.min(elements?.length || 0, 5) * 56}px`}
31
+ bind:openingId
31
32
  >
32
33
  <div class="selectable-list-wrapper">
33
34
  <SelectableVerticalList
@@ -20,6 +20,7 @@ declare const __propDef: {
20
20
  _maxHeight?: string | undefined;
21
21
  _minWidth?: string | undefined;
22
22
  _borderRadius?: string | undefined;
23
+ openingId?: ComponentProps<MenuOrDrawer>['openingId'];
23
24
  };
24
25
  events: {
25
26
  select: CustomEvent<{
@@ -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%;
@@ -10,6 +10,7 @@ export type Element = {
10
10
  backgroundColor?: string;
11
11
  };
12
12
  appendIcon?: string;
13
+ disabled?: boolean;
13
14
  };
14
15
  import '../../../css/main.css';
15
16
  import './SelectableVerticalList.css';
@@ -48,7 +48,7 @@ export default class Builder {
48
48
  kind: 'inBuilder',
49
49
  logicalOperator: logicalOperator,
50
50
  key: key,
51
- modifiers: inBuilder.modifiers
51
+ children: inBuilder.modifiers.filter((el) => el.method == 'where' || el.method == 'select')
52
52
  });
53
53
  }
54
54
  else {
@@ -1,4 +1,4 @@
1
- import type { Modifier } from "../builder";
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
- modifiers: Modifier[];
43
+ children: (ObjectWhere | SimpleWhere | GroupedWhere | InWhere | ColumnWhere | JsonSupersetWhere | InBuilderWhere | NullWhere | SelectModifier)[];
44
44
  };
45
45
  type JsonSupersetWhere = {
46
46
  method: 'where';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@likable-hair/svelte",
3
3
  "description": "A Svelte component for likablehair and others",
4
- "version": "3.1.21",
4
+ "version": "3.1.23",
5
5
  "scripts": {
6
6
  "host": "vite --host",
7
7
  "dev": "vite dev",