@likable-hair/svelte 3.3.29 → 3.3.31
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/composed/common/MenuOrDrawer.svelte +24 -27
- package/dist/components/composed/common/MenuOrDrawer.svelte.d.ts +2 -13
- package/dist/components/composed/common/MenuOrDrawerOptions.svelte +25 -22
- package/dist/components/composed/common/MenuOrDrawerOptions.svelte.d.ts +2 -12
- package/dist/components/composed/common/QuickActions.svelte +41 -33
- package/dist/components/composed/list/DynamicTable.css +10 -8
- package/dist/components/composed/list/DynamicTable.svelte +373 -342
- package/dist/components/composed/list/PaginatedTable.svelte +19 -10
- package/dist/components/composed/list/PaginatedTable.svelte.d.ts +3 -0
- package/dist/components/composed/progress/HorizontalStackedProgress.css +4 -0
- package/dist/components/composed/progress/HorizontalStackedProgress.svelte +19 -6
- package/dist/components/composed/progress/HorizontalStackedProgress.svelte.d.ts +1 -0
- package/dist/components/composed/search/DynamicFilters.svelte +3 -4
- package/dist/components/composed/search/FilterEditor.svelte +3 -0
- package/dist/components/composed/search/Filters.svelte +3 -1
- package/dist/components/simple/common/Menu.svelte +137 -1
- package/dist/components/simple/common/Menu.svelte.d.ts +1 -1
- package/dist/components/simple/forms/Autocomplete.svelte +8 -6
- package/dist/components/simple/forms/Checkbox.svelte +1 -0
- package/dist/components/simple/forms/Checkbox.svelte.d.ts +1 -0
- package/dist/components/simple/notifiers/AlertBanner.css +1 -0
- package/dist/components/simple/notifiers/AlertBanner.svelte +5 -5
- package/package.json +1 -1
|
@@ -4,49 +4,46 @@
|
|
|
4
4
|
import Menu from '../../simple/common/Menu.svelte';
|
|
5
5
|
import MediaQuery from '../../simple/common/MediaQuery.svelte';
|
|
6
6
|
import type { ComponentProps } from 'svelte';
|
|
7
|
+
import lodash from 'lodash'
|
|
7
8
|
|
|
8
9
|
export let open: boolean = false,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
_boxShadow:
|
|
15
|
-
_height:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
drawerProps: Omit<ComponentProps<Drawer>, 'open'> | undefined = undefined,
|
|
11
|
+
menuProps: Omit<ComponentProps<Menu>, 'open'> | undefined = undefined
|
|
12
|
+
|
|
13
|
+
const menuPropsDefaultValue = {
|
|
14
|
+
closeOnClickOutside: true,
|
|
15
|
+
_boxShadow: "rgb(var(--global-color-grey-900), .5) 0px 2px 4px",
|
|
16
|
+
_height: "fit-content",
|
|
17
|
+
_minWidth: "100px",
|
|
18
|
+
_borderRadius: "5px",
|
|
19
|
+
_width: "",
|
|
20
|
+
anchor: 'bottom-center',
|
|
21
|
+
stayInViewport: true
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
$: finalMenuProps = lodash.clone(lodash.merge(menuPropsDefaultValue, menuProps))
|
|
25
|
+
|
|
26
|
+
const drawerPropsDefaultValue = {
|
|
27
|
+
position: 'bottom'
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
$: finalDrawerProps = lodash.clone(lodash.merge(drawerPropsDefaultValue, drawerProps))
|
|
22
31
|
</script>
|
|
23
32
|
|
|
24
33
|
<MediaQuery let:mAndDown>
|
|
25
34
|
{#if mAndDown}
|
|
26
35
|
<Drawer
|
|
27
36
|
bind:open={open}
|
|
28
|
-
|
|
37
|
+
{...finalDrawerProps}
|
|
29
38
|
on:close
|
|
30
39
|
on:item-click
|
|
31
|
-
_overflow={_drawerOverflow}
|
|
32
40
|
>
|
|
33
41
|
<slot isDrawer={true} isMenu={false}></slot>
|
|
34
42
|
</Drawer>
|
|
35
43
|
{:else}
|
|
36
44
|
<Menu
|
|
37
|
-
bind:activator={activator}
|
|
38
45
|
bind:open={open}
|
|
39
|
-
|
|
40
|
-
_boxShadow={_boxShadow}
|
|
41
|
-
_height={_height}
|
|
42
|
-
_maxHeight={_maxHeight}
|
|
43
|
-
_minWidth={_minWidth}
|
|
44
|
-
_borderRadius={_borderRadius}
|
|
45
|
-
_width={_width || ""}
|
|
46
|
-
anchor={menuAnchor}
|
|
47
|
-
bind:stayInViewport={stayInViewport}
|
|
48
|
-
bind:flipOnOverflow={flipOnOverflow}
|
|
49
|
-
bind:openingId
|
|
46
|
+
{...finalMenuProps}
|
|
50
47
|
>
|
|
51
48
|
<slot isDrawer={false} isMenu={true}></slot>
|
|
52
49
|
</Menu>
|
|
@@ -22,19 +22,8 @@ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
|
22
22
|
} : {});
|
|
23
23
|
declare const MenuOrDrawer: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
24
24
|
open?: boolean;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
menuAnchor?: ComponentProps<Menu>["anchor"];
|
|
28
|
-
stayInViewport?: ComponentProps<Menu>["stayInViewport"];
|
|
29
|
-
flipOnOverflow?: ComponentProps<Menu>["flipOnOverflow"];
|
|
30
|
-
_boxShadow?: string;
|
|
31
|
-
_height?: string;
|
|
32
|
-
_width?: string | undefined;
|
|
33
|
-
_maxHeight?: string | undefined;
|
|
34
|
-
_minWidth?: string;
|
|
35
|
-
_borderRadius?: string;
|
|
36
|
-
openingId?: ComponentProps<Menu>["openingId"];
|
|
37
|
-
_drawerOverflow?: string | undefined;
|
|
25
|
+
drawerProps?: Omit<ComponentProps<Drawer>, "open"> | undefined;
|
|
26
|
+
menuProps?: Omit<ComponentProps<Menu>, "open"> | undefined;
|
|
38
27
|
}, {
|
|
39
28
|
default: {
|
|
40
29
|
isDrawer: boolean;
|
|
@@ -9,42 +9,45 @@
|
|
|
9
9
|
import type Drawer from '../../simple/navigation/Drawer.svelte';
|
|
10
10
|
import type Menu from '../../simple/common/Menu.svelte';
|
|
11
11
|
import SelectableVerticalList from '../../simple/lists/SelectableVerticalList.svelte';
|
|
12
|
+
import lodash from 'lodash'
|
|
12
13
|
|
|
13
14
|
export let open: boolean = false,
|
|
14
|
-
activator: HTMLElement,
|
|
15
|
-
drawerPosition: ComponentProps<Drawer>['position'] = 'bottom',
|
|
16
|
-
menuAnchor: ComponentProps<Menu>['anchor'] = 'bottom-center',
|
|
17
15
|
elements: ComponentProps<SelectableVerticalList>['elements'] = [],
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
_boxShadow: string = "rgb(var(--global-color-grey-900), .5) 0px 2px 4px",
|
|
21
|
-
_height: string = "300px",
|
|
22
|
-
_maxHeight: string | undefined = undefined,
|
|
23
|
-
_minWidth: string = "100px",
|
|
24
|
-
_borderRadius: string = "5px",
|
|
25
|
-
openingId: ComponentProps<MenuOrDrawer>['openingId'] = undefined;
|
|
16
|
+
drawerProps: Omit<ComponentProps<Drawer>, 'open'> | undefined = undefined,
|
|
17
|
+
menuProps: Omit<ComponentProps<Menu>, 'open'> | undefined = undefined
|
|
26
18
|
|
|
27
19
|
let selected: ArrayElement<NonNullable<ComponentProps<SelectableVerticalList>['elements']>>['name'] | undefined
|
|
28
20
|
let focused: ArrayElement<NonNullable<ComponentProps<SelectableVerticalList>['elements']>>['name'] | undefined
|
|
29
21
|
$: if(!!selected) selected = undefined
|
|
30
22
|
$: if(!!focused && !open) focused = undefined
|
|
23
|
+
|
|
24
|
+
const menuPropsDefaultValue = {
|
|
25
|
+
anchor: 'bottom-center',
|
|
26
|
+
stayInViewport: true,
|
|
27
|
+
flipOnOverflow: false,
|
|
28
|
+
_boxShadow: "rgb(var(--global-color-grey-900), .5) 0px 2px 4px",
|
|
29
|
+
_height: 'fit-content',
|
|
30
|
+
_maxHeight: undefined,
|
|
31
|
+
_minWidth: '100px',
|
|
32
|
+
_borderRadius: '5px',
|
|
33
|
+
openingId: undefined
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
$: finalMenuProps = lodash.clone(lodash.merge(menuPropsDefaultValue, menuProps))
|
|
37
|
+
|
|
38
|
+
const drawerPropsDefaultValue = {
|
|
39
|
+
position: 'bottom'
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
$: finalDrawerProps = lodash.clone(lodash.merge(drawerPropsDefaultValue, drawerProps))
|
|
31
43
|
</script>
|
|
32
44
|
|
|
33
45
|
<MenuOrDrawer
|
|
34
46
|
bind:open
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
bind:menuAnchor
|
|
38
|
-
bind:stayInViewport
|
|
39
|
-
bind:flipOnOverflow
|
|
40
|
-
{_boxShadow}
|
|
41
|
-
{_height}
|
|
42
|
-
{_maxHeight}
|
|
43
|
-
{_minWidth}
|
|
44
|
-
{_borderRadius}
|
|
47
|
+
drawerProps={finalDrawerProps}
|
|
48
|
+
menuProps={finalMenuProps}
|
|
45
49
|
let:isDrawer
|
|
46
50
|
--drawer-default-space={`${Math.min(elements?.length || 0, 5) * 56}px`}
|
|
47
|
-
bind:openingId
|
|
48
51
|
>
|
|
49
52
|
<div class="selectable-list-wrapper">
|
|
50
53
|
<SelectableVerticalList
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
|
|
2
2
|
import '../../../css/main.css';
|
|
3
3
|
import type { ComponentProps } from 'svelte';
|
|
4
|
-
import MenuOrDrawer from "./MenuOrDrawer.svelte";
|
|
5
4
|
import type Drawer from '../../simple/navigation/Drawer.svelte';
|
|
6
5
|
import type Menu from '../../simple/common/Menu.svelte';
|
|
7
6
|
import SelectableVerticalList from '../../simple/lists/SelectableVerticalList.svelte';
|
|
@@ -20,18 +19,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
20
19
|
}
|
|
21
20
|
declare const MenuOrDrawerOptions: $$__sveltets_2_IsomorphicComponent<{
|
|
22
21
|
open?: boolean;
|
|
23
|
-
activator: HTMLElement;
|
|
24
|
-
drawerPosition?: ComponentProps<Drawer>["position"];
|
|
25
|
-
menuAnchor?: ComponentProps<Menu>["anchor"];
|
|
26
22
|
elements?: ComponentProps<SelectableVerticalList>["elements"];
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_boxShadow?: string;
|
|
30
|
-
_height?: string;
|
|
31
|
-
_maxHeight?: string | undefined;
|
|
32
|
-
_minWidth?: string;
|
|
33
|
-
_borderRadius?: string;
|
|
34
|
-
openingId?: ComponentProps<MenuOrDrawer>["openingId"];
|
|
23
|
+
drawerProps?: Omit<ComponentProps<Drawer>, "open"> | undefined;
|
|
24
|
+
menuProps?: Omit<ComponentProps<Menu>, "open"> | undefined;
|
|
35
25
|
}, {
|
|
36
26
|
select: CustomEvent<{
|
|
37
27
|
element: import("../../simple/lists/SelectableVerticalList.svelte").Element;
|
|
@@ -56,6 +56,38 @@
|
|
|
56
56
|
</script>
|
|
57
57
|
|
|
58
58
|
{#if selectedItems > 0}
|
|
59
|
+
{#each actions as action}
|
|
60
|
+
{#if !!action.info && !action.disabled}
|
|
61
|
+
<ToolTip
|
|
62
|
+
appearTimeout={500}
|
|
63
|
+
activator={infoActivators[action.label]}
|
|
64
|
+
>
|
|
65
|
+
<div
|
|
66
|
+
style:background-color='rgb(var(--global-color-background-300), .95)'
|
|
67
|
+
style:border-radius="5px"
|
|
68
|
+
style:padding="10px"
|
|
69
|
+
style:color='rgb(var(--global-color-contrast-900))'
|
|
70
|
+
>
|
|
71
|
+
{action.info}
|
|
72
|
+
</div>
|
|
73
|
+
</ToolTip>
|
|
74
|
+
{/if}
|
|
75
|
+
{#if !!action.disabledInfo && action.disabled}
|
|
76
|
+
<ToolTip
|
|
77
|
+
appearTimeout={300}
|
|
78
|
+
activator={disabledInfoActivators[action.label]}
|
|
79
|
+
>
|
|
80
|
+
<div
|
|
81
|
+
style:background-color='rgb(var(--global-color-background-300), .95)'
|
|
82
|
+
style:border-radius="5px"
|
|
83
|
+
style:padding="10px"
|
|
84
|
+
style:color='rgb(var(--global-color-contrast-900))'
|
|
85
|
+
>
|
|
86
|
+
{action.disabledInfo}
|
|
87
|
+
</div>
|
|
88
|
+
</ToolTip>
|
|
89
|
+
{/if}
|
|
90
|
+
{/each}
|
|
59
91
|
<div
|
|
60
92
|
class="container-{position}"
|
|
61
93
|
transition:fly={{ delay: 150, duration: 150, y: -10, easing: cubicIn }}
|
|
@@ -102,36 +134,8 @@
|
|
|
102
134
|
--icon-size="16px"
|
|
103
135
|
/>
|
|
104
136
|
</div>
|
|
105
|
-
<ToolTip
|
|
106
|
-
appearTimeout={500}
|
|
107
|
-
activator={infoActivators[action.label]}
|
|
108
|
-
>
|
|
109
|
-
<div
|
|
110
|
-
style:background-color='rgb(var(--global-color-background-300), .95)'
|
|
111
|
-
style:border-radius="5px"
|
|
112
|
-
style:padding="10px"
|
|
113
|
-
style:color='rgb(var(--global-color-contrast-900))'
|
|
114
|
-
>
|
|
115
|
-
{action.info}
|
|
116
|
-
</div>
|
|
117
|
-
</ToolTip>
|
|
118
137
|
{/if}
|
|
119
138
|
{action.label}
|
|
120
|
-
{#if !!action.disabledInfo && action.disabled}
|
|
121
|
-
<ToolTip
|
|
122
|
-
appearTimeout={300}
|
|
123
|
-
activator={disabledInfoActivators[action.label]}
|
|
124
|
-
>
|
|
125
|
-
<div
|
|
126
|
-
style:background-color='rgb(var(--global-color-background-300), .95)'
|
|
127
|
-
style:border-radius="5px"
|
|
128
|
-
style:padding="10px"
|
|
129
|
-
style:color='rgb(var(--global-color-contrast-900))'
|
|
130
|
-
>
|
|
131
|
-
{action.disabledInfo}
|
|
132
|
-
</div>
|
|
133
|
-
</ToolTip>
|
|
134
|
-
{/if}
|
|
135
139
|
</div>
|
|
136
140
|
</Button>
|
|
137
141
|
{/each}
|
|
@@ -174,11 +178,15 @@
|
|
|
174
178
|
<div class="menu-or-drawer">
|
|
175
179
|
<MenuOrDrawer
|
|
176
180
|
bind:open={openMoreActions}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
181
|
+
menuProps={{
|
|
182
|
+
activator: moreActionsActivator,
|
|
183
|
+
anchor: 'bottom-center',
|
|
184
|
+
openingId: 'more-actions',
|
|
185
|
+
}}
|
|
186
|
+
drawerProps={{
|
|
187
|
+
position: position == 'bottom' ? 'top' : 'bottom',
|
|
188
|
+
_overflow: 'hidden'
|
|
189
|
+
}}
|
|
182
190
|
let:isMenu
|
|
183
191
|
let:isDrawer
|
|
184
192
|
>
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--dynamic-table-default-cell-editor-background-color: rgb(var(--global-color-background-300));
|
|
3
3
|
--dynamic-table-default-quick-filter-background-color: rgb(var(--global-color-background-300));
|
|
4
|
-
--dynamic-table-default-row-background-color-hover: rgb(var(--global-color-background-
|
|
5
|
-
--dynamic-table-default-expanded-row-background-color: rgb(var(--global-color-background-
|
|
4
|
+
--dynamic-table-default-row-background-color-hover: rgb(var(--global-color-background-200));
|
|
5
|
+
--dynamic-table-default-expanded-row-background-color: rgb(var(--global-color-background-300));
|
|
6
6
|
--dynamic-table-default-selected-row-background-color: rgb(var(--global-color-primary-200));
|
|
7
7
|
--dynamic-table-default-row-disabled-background-color: rgb(var(--global-color-primary-400));
|
|
8
|
-
--dynamic-table-default-header-background-color: rgb(var(--global-color-background-
|
|
8
|
+
--dynamic-table-default-header-background-color: rgb(var(--global-color-background-400));
|
|
9
9
|
--dynamic-table-default-background-color: transparent;
|
|
10
10
|
--dynamic-table-default-max-height: 70vh;
|
|
11
|
-
--dynamic-table-default-header-padding:
|
|
11
|
+
--dynamic-table-default-header-padding: 4px 0 4px 8px;
|
|
12
12
|
--dynamic-table-default-header-font-size: 13px;
|
|
13
13
|
--dynamic-table-default-header-font-weight: 700;
|
|
14
14
|
--dynamic-table-default-subheader-background-color: rgb(var(--global-color-background-100));
|
|
15
15
|
--dynamic-table-default-hover-color: rgb(var(--global-color-contrast-800), .7);
|
|
16
16
|
--dynamic-table-default-header-border-radius: 5px;
|
|
17
|
-
--dynamic-table-default-header-height:
|
|
18
|
-
--dynamic-table-default-row-min-height:
|
|
17
|
+
--dynamic-table-default-header-height: 25px;
|
|
18
|
+
--dynamic-table-default-row-min-height: 45px;
|
|
19
19
|
--dynamic-table-default-end-line-background-color: transparent;
|
|
20
20
|
--dynamic-table-default-end-line-color: rgb(var(--global-color-contrast-500));
|
|
21
21
|
--dynamic-table-default-end-line-text-color: rgb(var(--global-color-contrast-500));
|
|
22
|
-
--dynamic-table-default-border-collapse:
|
|
23
|
-
--dynamic-table-default-cell-border:
|
|
22
|
+
--dynamic-table-default-border-collapse: collapse;
|
|
23
|
+
--dynamic-table-default-cell-border: none;
|
|
24
|
+
--dynamic-table-default-label-margin: 0px 4px 0px 0px;
|
|
25
|
+
--dynamic-table-default-label-font-size: small;
|
|
24
26
|
}
|