@likable-hair/svelte 2.0.8 → 3.0.0
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/search/GlobalSearchTextField.css +11 -0
- package/dist/components/composed/search/GlobalSearchTextField.svelte +52 -30
- package/dist/components/composed/search/GlobalSearchTextField.svelte.d.ts +6 -9
- package/dist/components/composed/search/SearchBar.css +10 -0
- package/dist/components/composed/search/SearchBar.svelte +43 -20
- package/dist/components/composed/search/SearchBar.svelte.d.ts +6 -9
- package/dist/components/composed/search/SearchResults.css +5 -0
- package/dist/components/composed/search/SearchResults.svelte +45 -23
- package/dist/components/composed/search/SearchResults.svelte.d.ts +7 -8
- package/dist/components/layouts/CollapsibleSideBarLayout.css +5 -0
- package/dist/components/layouts/CollapsibleSideBarLayout.svelte +6 -7
- package/dist/components/layouts/NewCollapsibleSideBarLayout.svelte +155 -0
- package/dist/components/layouts/NewCollapsibleSideBarLayout.svelte.d.ts +38 -0
- package/dist/components/layouts/StableDividedSideBarLayout.css +16 -0
- package/dist/components/layouts/StableDividedSideBarLayout.svelte +81 -31
- package/dist/components/layouts/StableDividedSideBarLayout.svelte.d.ts +7 -10
- package/dist/components/simple/buttons/Button.css +18 -0
- package/dist/components/simple/buttons/Button.svelte +150 -50
- package/dist/components/simple/buttons/Button.svelte.d.ts +5 -25
- package/dist/components/simple/buttons/LinkButton.css +13 -0
- package/dist/components/simple/buttons/LinkButton.svelte +48 -25
- package/dist/components/simple/buttons/LinkButton.svelte.d.ts +2 -11
- package/dist/components/simple/common/CollapsibleDivider.css +14 -0
- package/dist/components/simple/common/CollapsibleDivider.svelte +81 -25
- package/dist/components/simple/common/CollapsibleDivider.svelte.d.ts +1 -11
- package/dist/components/simple/common/Menu.svelte +32 -2
- package/dist/components/simple/common/Menu.svelte.d.ts +1 -0
- package/dist/components/simple/dates/Calendar.css +10 -0
- package/dist/components/simple/dates/Calendar.svelte +52 -17
- package/dist/components/simple/dates/Calendar.svelte.d.ts +7 -10
- package/dist/components/simple/dates/DatePicker.css +9 -0
- package/dist/components/simple/dates/DatePicker.svelte +74 -55
- package/dist/components/simple/dates/DatePicker.svelte.d.ts +15 -11
- package/dist/components/simple/dates/DatePickerTextField.svelte +148 -0
- package/dist/components/simple/dates/DatePickerTextField.svelte.d.ts +28 -0
- package/dist/components/simple/dates/MonthSelector.css +4 -0
- package/dist/components/simple/dates/MonthSelector.svelte +20 -9
- package/dist/components/simple/dates/MonthSelector.svelte.d.ts +5 -4
- package/dist/components/simple/dates/YearSelector.css +4 -0
- package/dist/components/simple/dates/YearSelector.svelte +23 -10
- package/dist/components/simple/dates/YearSelector.svelte.d.ts +3 -2
- package/dist/components/simple/forms/Autocomplete.css +12 -0
- package/dist/components/simple/forms/Autocomplete.svelte +101 -50
- package/dist/components/simple/forms/Autocomplete.svelte.d.ts +7 -29
- package/dist/components/simple/forms/SimpleTextField.css +17 -0
- package/dist/components/simple/forms/SimpleTextField.svelte +110 -44
- package/dist/components/simple/forms/SimpleTextField.svelte.d.ts +13 -22
- package/dist/components/simple/lists/SelectableMenuList.css +7 -0
- package/dist/components/simple/lists/SelectableMenuList.svelte +107 -0
- package/dist/components/simple/lists/SelectableMenuList.svelte.d.ts +38 -0
- package/dist/components/simple/lists/SelectableVerticalList.svelte +1 -1
- package/dist/components/simple/lists/SidebarMenuList.css +7 -0
- package/dist/components/simple/lists/SidebarMenuList.svelte +43 -15
- package/dist/components/simple/lists/SidebarMenuList.svelte.d.ts +1 -0
- package/dist/components/simple/loaders/CircularLoader.css +5 -0
- package/dist/components/simple/loaders/CircularLoader.svelte +20 -4
- package/dist/components/simple/loaders/CircularLoader.svelte.d.ts +2 -3
- package/dist/components/simple/media/Icon.svelte +18 -7
- package/dist/components/simple/media/Icon.svelte.d.ts +0 -2
- package/dist/components/simple/navigation/Chip.css +14 -0
- package/dist/components/simple/navigation/Chip.svelte +74 -15
- package/dist/components/simple/navigation/Chip.svelte.d.ts +2 -3
- package/dist/components/simple/navigation/Drawer.css +9 -0
- package/dist/components/simple/navigation/Drawer.svelte +81 -74
- package/dist/components/simple/navigation/Drawer.svelte.d.ts +1 -8
- package/dist/components/simple/navigation/HeaderMenu.css +3 -0
- package/dist/components/simple/navigation/HeaderMenu.svelte +39 -63
- package/dist/components/simple/navigation/HeaderMenu.svelte.d.ts +5 -9
- package/dist/components/simple/notifiers/AlertBanner.css +9 -0
- package/dist/components/simple/notifiers/AlertBanner.svelte +21 -22
- package/dist/components/simple/notifiers/AlertBanner.svelte.d.ts +6 -9
- package/dist/components/simple/timeline/SimpleTimeLine.svelte.d.ts +1 -1
- package/dist/components/simple/typography/Code.svelte.d.ts +1 -1
- package/dist/css/main.css +261 -0
- package/dist/stores/theme.d.ts +30 -0
- package/dist/stores/theme.js +85 -0
- package/package.json +6 -3
- package/dist/components/simple/buttons/DefaultButton.svelte +0 -93
- package/dist/components/simple/buttons/DefaultButton.svelte.d.ts +0 -50
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--global-search-text-field-default-ring-color: rgb(var(--global-color-contrast-100)); /* rgba(24, 24, 27, .1) */
|
|
3
|
+
--global-search-text-field-default-hover-ring-color: rgb(var(--global-color-contrast-300)); /* rgba(24, 24, 27, .2) */
|
|
4
|
+
--global-search-text-field-default-color: rgb(var(--global-color-contrast-600)); /* rgb(113 113 122) */
|
|
5
|
+
--global-search-text-field-default-width: 100%;
|
|
6
|
+
--global-search-text-field-default-max-width: 28rem;
|
|
7
|
+
--global-search-text-field-default-height: 2rem;
|
|
8
|
+
--global-search-text-field-default-background-color: rgb(var(--global-color-background-100));
|
|
9
|
+
--global-search-text-field-default-padding: 0rem 0.75rem 0rem 0.5rem;
|
|
10
|
+
--global-search-text-field-default-font-size: .875rem;
|
|
11
|
+
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
<script>import
|
|
1
|
+
<script>import "./GlobalSearchTextField.css";
|
|
2
|
+
import Dialog from "../../simple/dialogs/Dialog.svelte";
|
|
2
3
|
import { createEventDispatcher, onMount } from "svelte";
|
|
3
4
|
import SearchBar from "./SearchBar.svelte";
|
|
4
5
|
import Keyboarder, {} from "../../../utils/keyboarder";
|
|
5
6
|
import SearchResults, {} from "./SearchResults.svelte";
|
|
6
|
-
|
|
7
|
+
let clazz = {};
|
|
8
|
+
export { clazz as class };
|
|
9
|
+
export let searchButtonText = "Search", searchDialogOpened = false, transitionDuration = ".8s", searcher = () => Promise.resolve([]);
|
|
7
10
|
let searchBarInput, searchText = void 0, searchResults = void 0, searchLoading = false;
|
|
8
11
|
let dispatch = createEventDispatcher();
|
|
9
12
|
onMount(() => {
|
|
@@ -38,24 +41,14 @@ async function search() {
|
|
|
38
41
|
}
|
|
39
42
|
</script>
|
|
40
43
|
|
|
41
|
-
<div
|
|
42
|
-
style:--global-search-text-field-ring-color={searchButtonRingColor}
|
|
43
|
-
style:--global-search-text-field-hover-ring-color={searchButtonHoverRingColor}
|
|
44
|
-
style:--global-search-text-field-color={color}
|
|
45
|
-
style:--global-search-text-field-width={searchButtonWidth}
|
|
46
|
-
style:--global-search-text-field-max-width={searchButtonMaxWidth}
|
|
47
|
-
style:--global-search-text-field-height={searchButtonHeight}
|
|
48
|
-
style:--global-search-text-field-background-color={searchButtonBackgroundColor}
|
|
49
|
-
style:--global-search-text-field-padding={searchButtonPadding}
|
|
50
|
-
style:--global-search-text-field-font-size={searchButtonFontSize}
|
|
51
|
-
>
|
|
44
|
+
<div class={clazz.container || ''}>
|
|
52
45
|
<slot
|
|
53
46
|
name="search-button"
|
|
54
47
|
{toggleSearchDialog}
|
|
55
48
|
>
|
|
56
49
|
<button
|
|
57
50
|
on:click={toggleSearchDialog}
|
|
58
|
-
class="search-like-button"
|
|
51
|
+
class="search-like-button {clazz.button || ''}"
|
|
59
52
|
>
|
|
60
53
|
<slot name="search-button-icon">
|
|
61
54
|
<svg
|
|
@@ -74,15 +67,15 @@ async function search() {
|
|
|
74
67
|
{searchButtonText}
|
|
75
68
|
</slot>
|
|
76
69
|
<slot name="search-button-shortcut">
|
|
77
|
-
<kbd class="shortcut"><kbd class="shortcut">⌘</kbd><kbd class="shortcut">K</kbd></kbd>
|
|
70
|
+
<kbd class="shortcut {clazz.shortcut || ''}"><kbd class="shortcut">⌘</kbd><kbd class="shortcut">K</kbd></kbd>
|
|
78
71
|
</slot>
|
|
79
72
|
</button>
|
|
80
73
|
</slot>
|
|
81
74
|
<Dialog
|
|
82
75
|
bind:open={searchDialogOpened}
|
|
83
76
|
transition="scale"
|
|
84
|
-
|
|
85
|
-
|
|
77
|
+
_overlayBackdropFilter="blur(2px)"
|
|
78
|
+
_transitionDuration={transitionDuration}
|
|
86
79
|
>
|
|
87
80
|
<div
|
|
88
81
|
style:max-width="90vw"
|
|
@@ -119,8 +112,8 @@ async function search() {
|
|
|
119
112
|
searchResults
|
|
120
113
|
>
|
|
121
114
|
<SearchResults
|
|
122
|
-
margin="-.5rem 0 0 0"
|
|
123
|
-
|
|
115
|
+
--search-results-margin="-.5rem 0 0 0"
|
|
116
|
+
--search-results-border-radius="0 0 .5rem .5rem"
|
|
124
117
|
loading={searchLoading}
|
|
125
118
|
results={searchResults}
|
|
126
119
|
activeKeyboard
|
|
@@ -135,20 +128,43 @@ async function search() {
|
|
|
135
128
|
|
|
136
129
|
<style>
|
|
137
130
|
.search-like-button {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
131
|
+
box-shadow: inset 0 0 0 1px var(
|
|
132
|
+
--global-search-text-field-ring-color,
|
|
133
|
+
var(--global-search-text-field-default-ring-color)
|
|
134
|
+
);
|
|
135
|
+
color: var(
|
|
136
|
+
--global-search-text-field-color,
|
|
137
|
+
var(--global-search-text-field-default-color)
|
|
138
|
+
);
|
|
141
139
|
display: flex;
|
|
142
140
|
align-items: center;
|
|
143
141
|
gap: 0.5rem;
|
|
144
|
-
width: var(
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
142
|
+
width: var(
|
|
143
|
+
--global-search-text-field-width,
|
|
144
|
+
var(--global-search-text-field-default-width)
|
|
145
|
+
);
|
|
146
|
+
max-width: var(
|
|
147
|
+
--global-search-text-field-max-width,
|
|
148
|
+
var(--global-search-text-field-default-max-width)
|
|
149
|
+
);
|
|
150
|
+
height: var(
|
|
151
|
+
--global-search-text-field-height,
|
|
152
|
+
var(--global-search-text-field-default-height)
|
|
153
|
+
);
|
|
154
|
+
font-size: var(
|
|
155
|
+
--global-search-text-field-font-size,
|
|
156
|
+
var(--global-search-text-field-default-font-size)
|
|
157
|
+
);
|
|
148
158
|
line-height: 1.5rem;
|
|
149
|
-
background-color: var(
|
|
159
|
+
background-color: var(
|
|
160
|
+
--global-search-text-field-background-color,
|
|
161
|
+
var(--global-search-text-field-default-background-color)
|
|
162
|
+
);
|
|
150
163
|
border-radius: 9999px;
|
|
151
|
-
padding: var(
|
|
164
|
+
padding: var(
|
|
165
|
+
--global-search-text-field-padding,
|
|
166
|
+
var(--global-search-text-field-default-padding)
|
|
167
|
+
);
|
|
152
168
|
border: 0 solid #e5e7eb;
|
|
153
169
|
cursor: pointer;
|
|
154
170
|
transition-property: box-shadow;
|
|
@@ -157,7 +173,10 @@ async function search() {
|
|
|
157
173
|
}
|
|
158
174
|
|
|
159
175
|
.search-like-button:hover {
|
|
160
|
-
box-shadow: inset 0 0 0 1px var(
|
|
176
|
+
box-shadow: inset 0 0 0 1px var(
|
|
177
|
+
--global-search-text-field-hover-ring-color,
|
|
178
|
+
var(--global-search-text-field-default-hover-ring-color)
|
|
179
|
+
);
|
|
161
180
|
}
|
|
162
181
|
|
|
163
182
|
.search-icon {
|
|
@@ -169,7 +188,10 @@ async function search() {
|
|
|
169
188
|
.shortcut {
|
|
170
189
|
margin-left: auto;
|
|
171
190
|
font-size: 1rem;
|
|
172
|
-
color: var(
|
|
191
|
+
color: var(
|
|
192
|
+
--global-search-text-field-color,
|
|
193
|
+
var(--global-search-text-field-default-color)
|
|
194
|
+
);
|
|
173
195
|
text-transform: none;
|
|
174
196
|
font-family: ui-sans-serif,system-ui,-apple-system;
|
|
175
197
|
}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import './GlobalSearchTextField.css';
|
|
2
3
|
import { type Result } from './SearchResults.svelte';
|
|
3
4
|
declare const __propDef: {
|
|
4
5
|
props: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
searchButtonHeight?: string | undefined;
|
|
11
|
-
searchButtonBackgroundColor?: string | undefined;
|
|
12
|
-
searchButtonPadding?: string | undefined;
|
|
13
|
-
searchButtonFontSize?: string | undefined;
|
|
6
|
+
class?: {
|
|
7
|
+
container?: string | undefined;
|
|
8
|
+
button?: string | undefined;
|
|
9
|
+
shortcut?: string | undefined;
|
|
10
|
+
} | undefined;
|
|
14
11
|
searchButtonText?: string | undefined;
|
|
15
12
|
searchDialogOpened?: boolean | undefined;
|
|
16
13
|
transitionDuration?: string | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--search-bar-default-ring-color: rgb(var(--global-color-contrast-100));
|
|
3
|
+
--search-bar-default-background-color: rgb(var(--global-color-background-100));
|
|
4
|
+
--search-bar-default-border-radius: 0.5rem;
|
|
5
|
+
--search-bar-default-height: 3rem;
|
|
6
|
+
--search-bar-default-padding: 0rem 1rem 0rem 1rem;
|
|
7
|
+
--search-bar-default-line-height: 1.5rem;
|
|
8
|
+
--search-bar-default-font-size: .875rem;
|
|
9
|
+
--search-bar-default-width: 100%;
|
|
10
|
+
}
|
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
<script>
|
|
1
|
+
<script>import "./SearchBar.css";
|
|
2
|
+
let clazz = {};
|
|
3
|
+
export { clazz as class };
|
|
4
|
+
export let input = void 0, value = void 0;
|
|
2
5
|
</script>
|
|
3
6
|
|
|
4
7
|
<div
|
|
5
|
-
|
|
6
|
-
style:--search-bar-background-color={backgroundColor}
|
|
7
|
-
style:--search-bar-border-radius={borderRadius}
|
|
8
|
-
style:--search-bar-height={height}
|
|
9
|
-
style:--search-bar-padding={padding}
|
|
10
|
-
style:--search-bar-line-height={lineHeight}
|
|
11
|
-
style:--search-bar-font-size={fontSize}
|
|
12
|
-
style:max-width={maxWidth}
|
|
13
|
-
style:width={width}
|
|
14
|
-
class="container"
|
|
8
|
+
class="container {clazz.container}"
|
|
15
9
|
>
|
|
16
10
|
<slot name="icon">
|
|
17
11
|
<svg
|
|
18
12
|
viewBox="0 0 20 20"
|
|
19
13
|
fill="none"
|
|
20
14
|
aria-hidden="true"
|
|
21
|
-
class="search-icon"
|
|
15
|
+
class="search-icon {clazz.icon}"
|
|
22
16
|
><path
|
|
23
17
|
stroke-linecap="round"
|
|
24
18
|
stroke-linejoin="round"
|
|
@@ -39,7 +33,7 @@
|
|
|
39
33
|
placeholder="Find something..."
|
|
40
34
|
maxlength="512"
|
|
41
35
|
tabindex="0"
|
|
42
|
-
class="input"
|
|
36
|
+
class="input {clazz.input}"
|
|
43
37
|
bind:this={input}
|
|
44
38
|
bind:value={value}
|
|
45
39
|
on:input
|
|
@@ -51,20 +45,49 @@
|
|
|
51
45
|
|
|
52
46
|
<style>
|
|
53
47
|
.container {
|
|
54
|
-
box-shadow: inset 0 0 0 1px var(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
48
|
+
box-shadow: inset 0 0 0 1px var(
|
|
49
|
+
--search-bar-ring-color,
|
|
50
|
+
var(--search-bar-default-ring-color)
|
|
51
|
+
);
|
|
52
|
+
background-color: var(
|
|
53
|
+
--search-bar-background-color,
|
|
54
|
+
var(--search-bar-default-background-color)
|
|
55
|
+
);
|
|
56
|
+
border-radius: var(
|
|
57
|
+
--search-bar-border-radius,
|
|
58
|
+
var(--search-bar-default-border-radius)
|
|
59
|
+
);
|
|
60
|
+
height: var(
|
|
61
|
+
--search-bar-height,
|
|
62
|
+
var(--search-bar-default-height)
|
|
63
|
+
);
|
|
58
64
|
display: flex;
|
|
59
65
|
align-items: center;
|
|
60
66
|
gap: 0.5rem;
|
|
61
|
-
padding: var(
|
|
67
|
+
padding: var(
|
|
68
|
+
--search-bar-padding,
|
|
69
|
+
var(--search-bar-default-padding)
|
|
70
|
+
);
|
|
62
71
|
box-sizing: border-box;
|
|
72
|
+
max-width: var(
|
|
73
|
+
--search-bar-max-width,
|
|
74
|
+
var(--search-bar-default-max-width)
|
|
75
|
+
);
|
|
76
|
+
width: var(
|
|
77
|
+
--search-bar-width,
|
|
78
|
+
var(--search-bar-default-width)
|
|
79
|
+
);
|
|
63
80
|
}
|
|
64
81
|
|
|
65
82
|
.input {
|
|
66
|
-
font-size: var(
|
|
67
|
-
|
|
83
|
+
font-size: var(
|
|
84
|
+
--search-bar-font-size,
|
|
85
|
+
var(--search-bar-default-font-size)
|
|
86
|
+
);
|
|
87
|
+
line-height: var(
|
|
88
|
+
--search-bar-line-height,
|
|
89
|
+
var(--search-bar-default-line-height)
|
|
90
|
+
);
|
|
68
91
|
box-sizing: border-box;
|
|
69
92
|
border: 0 solid #e5e7eb;
|
|
70
93
|
outline: 2px solid transparent;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import './SearchBar.css';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
height?: string | undefined;
|
|
10
|
-
padding?: string | undefined;
|
|
11
|
-
lineHeight?: string | undefined;
|
|
12
|
-
fontSize?: string | undefined;
|
|
5
|
+
class?: {
|
|
6
|
+
container?: string | undefined;
|
|
7
|
+
icon?: string | undefined;
|
|
8
|
+
input?: string | undefined;
|
|
9
|
+
} | undefined;
|
|
13
10
|
input?: HTMLElement | undefined;
|
|
14
11
|
value?: string | undefined;
|
|
15
12
|
};
|
|
@@ -1,36 +1,31 @@
|
|
|
1
1
|
<script context="module"></script>
|
|
2
2
|
|
|
3
|
-
<script>import
|
|
4
|
-
|
|
3
|
+
<script>import "./SearchResults.css";
|
|
4
|
+
import SelectableVerticalList from "../../simple/lists/SelectableVerticalList.svelte";
|
|
5
|
+
let clazz = {};
|
|
6
|
+
export { clazz as class };
|
|
7
|
+
export let noDataText = "Sorry, nothing found", loadingText = "Searching for references ...", results = [], loading = false, footer = true, activeKeyboard = false;
|
|
5
8
|
</script>
|
|
6
9
|
|
|
7
10
|
<div
|
|
8
|
-
|
|
9
|
-
style:--search-results-max-width={maxWidth}
|
|
10
|
-
style:--search-results-height={height}
|
|
11
|
-
style:--search-results-max-height={maxHeight}
|
|
12
|
-
style:--search-results-margin={margin}
|
|
13
|
-
style:--search-results-background-color={backgroundColor}
|
|
14
|
-
style:--search-results-border-color={borderColor}
|
|
15
|
-
style:--search-results-border-radius={borderRadius}
|
|
16
|
-
class="container"
|
|
11
|
+
class="container {clazz.container || ''}"
|
|
17
12
|
>
|
|
18
13
|
{#if loading}
|
|
19
|
-
<div class="loading-container">
|
|
14
|
+
<div class="loading-container {clazz.loading || ''}">
|
|
20
15
|
<slot name="loading">
|
|
21
16
|
<span style:font-size=".875rem">{loadingText}</span>
|
|
22
17
|
</slot>
|
|
23
18
|
</div>
|
|
24
19
|
{:else if !results || results.length == 0}
|
|
25
20
|
<div
|
|
26
|
-
class="no-data-container"
|
|
21
|
+
class="no-data-container {clazz.noData || ''}"
|
|
27
22
|
>
|
|
28
23
|
<slot name="no-data">
|
|
29
24
|
<span style:font-size=".875rem">{noDataText}</span>
|
|
30
25
|
</slot>
|
|
31
26
|
</div>
|
|
32
27
|
{:else}
|
|
33
|
-
<div>
|
|
28
|
+
<div class={clazz.results || ''}>
|
|
34
29
|
<SelectableVerticalList
|
|
35
30
|
elements={results.map((r) => {
|
|
36
31
|
return {
|
|
@@ -72,14 +67,38 @@ export let maxWidth = void 0, width = "100%", height = void 0, maxHeight = void
|
|
|
72
67
|
|
|
73
68
|
<style>
|
|
74
69
|
.container {
|
|
75
|
-
width: var(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
70
|
+
width: var(
|
|
71
|
+
--search-results-width,
|
|
72
|
+
var(--search-results-default-width)
|
|
73
|
+
);
|
|
74
|
+
max-width: var(
|
|
75
|
+
--search-results-max-width,
|
|
76
|
+
var(--search-results-default-max-width)
|
|
77
|
+
);
|
|
78
|
+
height: var(
|
|
79
|
+
--search-results-height,
|
|
80
|
+
var(--search-results-default-height)
|
|
81
|
+
);
|
|
82
|
+
max-height: var(
|
|
83
|
+
--search-results-max-height,
|
|
84
|
+
var(--search-results-default-max-height)
|
|
85
|
+
);
|
|
86
|
+
background-color: var(
|
|
87
|
+
--search-results-background-color,
|
|
88
|
+
var(--search-results-default-background-color)
|
|
89
|
+
);
|
|
90
|
+
margin: var(
|
|
91
|
+
--search-results-margin,
|
|
92
|
+
var(--search-results-default-margin)
|
|
93
|
+
);
|
|
94
|
+
border-top: 1px solid var(
|
|
95
|
+
--search-results-border-color,
|
|
96
|
+
var(--search-results-default-border-color)
|
|
97
|
+
);
|
|
98
|
+
border-radius: var(
|
|
99
|
+
--search-results-border-radius,
|
|
100
|
+
var(--search-results-default-border-radius)
|
|
101
|
+
);
|
|
83
102
|
}
|
|
84
103
|
|
|
85
104
|
.no-data-container, .loading-container {
|
|
@@ -90,7 +109,10 @@ export let maxWidth = void 0, width = "100%", height = void 0, maxHeight = void
|
|
|
90
109
|
}
|
|
91
110
|
|
|
92
111
|
.footer {
|
|
93
|
-
border-top: 1px solid var(
|
|
112
|
+
border-top: 1px solid var(
|
|
113
|
+
--search-results-border-color,
|
|
114
|
+
var(--search-results-default-border-color)
|
|
115
|
+
);
|
|
94
116
|
display: flex;
|
|
95
117
|
align-items: center;
|
|
96
118
|
justify-content: flex-end;
|
|
@@ -6,18 +6,17 @@ export type Result = {
|
|
|
6
6
|
url?: string;
|
|
7
7
|
data?: Record<string, any>;
|
|
8
8
|
};
|
|
9
|
+
import './SearchResults.css';
|
|
9
10
|
declare const __propDef: {
|
|
10
11
|
props: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
class?: {
|
|
13
|
+
container?: string | undefined;
|
|
14
|
+
loading?: string | undefined;
|
|
15
|
+
noData?: string | undefined;
|
|
16
|
+
results?: string | undefined;
|
|
17
|
+
} | undefined;
|
|
17
18
|
noDataText?: string | undefined;
|
|
18
19
|
loadingText?: string | undefined;
|
|
19
|
-
borderColor?: string | undefined;
|
|
20
|
-
borderRadius?: string | undefined;
|
|
21
20
|
results?: Result[] | undefined;
|
|
22
21
|
loading?: boolean | undefined;
|
|
23
22
|
footer?: boolean | undefined;
|
|
@@ -129,15 +129,8 @@ $:
|
|
|
129
129
|
class="main-section"
|
|
130
130
|
class:collapsed={drawerCollapsed}
|
|
131
131
|
>
|
|
132
|
-
<div
|
|
133
|
-
class="overlay"
|
|
134
|
-
on:click={handleOverlayClick}
|
|
135
|
-
on:keypress={handleOverlayClick}
|
|
136
|
-
class:visible={drawerOpened}
|
|
137
|
-
></div>
|
|
138
132
|
<div
|
|
139
133
|
style:padding={_pagePadding}
|
|
140
|
-
class:blurred={drawerOpened}
|
|
141
134
|
>
|
|
142
135
|
<slot>Content</slot>
|
|
143
136
|
</div>
|
|
@@ -186,6 +179,12 @@ $:
|
|
|
186
179
|
background-color: var(--collapsible-side-bar-layout-sidebar-background-color);
|
|
187
180
|
}
|
|
188
181
|
|
|
182
|
+
@media (max-width: 1023.98px) {
|
|
183
|
+
.side-bar-content {
|
|
184
|
+
visibility: hidden
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
189
188
|
.side-bar.collapsed {
|
|
190
189
|
width: var(--collapsible-side-bar-layout-collapsed-width);
|
|
191
190
|
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
<script>import "./CollapsibleSideBarLayout.css";
|
|
2
|
+
import { createEventDispatcher } from "svelte";
|
|
3
|
+
import CollapsibleDivider from "../simple/common/CollapsibleDivider.svelte";
|
|
4
|
+
import MediaQuery from "../simple/common/MediaQuery.svelte";
|
|
5
|
+
import SelectableMenuList from "../simple/lists/SelectableMenuList.svelte";
|
|
6
|
+
import HeaderMenu from "../simple/navigation/HeaderMenu.svelte";
|
|
7
|
+
export let drawerOpened = false, drawerCollapsed = false, menuItems = [], selectedMenuElementName = void 0, fullLogo = void 0, partialLogo = void 0;
|
|
8
|
+
let dispatch = createEventDispatcher();
|
|
9
|
+
function handleMenuSelect(event) {
|
|
10
|
+
dispatch("menu-select", {
|
|
11
|
+
menu: event.detail.item
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function handleCollpsabledDividerChange() {
|
|
15
|
+
dispatch("collapse", {
|
|
16
|
+
collapsed: drawerCollapsed
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<MediaQuery let:mAndDown>
|
|
22
|
+
<div class="container">
|
|
23
|
+
<div
|
|
24
|
+
class="sidebar"
|
|
25
|
+
class:collapsed={drawerCollapsed}
|
|
26
|
+
>
|
|
27
|
+
<div
|
|
28
|
+
class="logo-container"
|
|
29
|
+
class:collapsed={drawerCollapsed}
|
|
30
|
+
>
|
|
31
|
+
<slot name="logo" collapsed={drawerCollapsed} mAndDown>
|
|
32
|
+
<img src={drawerCollapsed ? partialLogo : fullLogo} alt="logo">
|
|
33
|
+
</slot>
|
|
34
|
+
</div>
|
|
35
|
+
<SelectableMenuList
|
|
36
|
+
items={menuItems}
|
|
37
|
+
collapsed={drawerCollapsed}
|
|
38
|
+
selected={selectedMenuElementName}
|
|
39
|
+
on:select={handleMenuSelect}
|
|
40
|
+
></SelectableMenuList>
|
|
41
|
+
<CollapsibleDivider
|
|
42
|
+
bind:collapsed={drawerCollapsed}
|
|
43
|
+
on:change={handleCollpsabledDividerChange}
|
|
44
|
+
></CollapsibleDivider>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="header-menu">
|
|
47
|
+
<HeaderMenu
|
|
48
|
+
bind:openDrawer={drawerOpened}
|
|
49
|
+
on:drawer-change
|
|
50
|
+
>
|
|
51
|
+
<svelte:fragment slot="title">
|
|
52
|
+
<div class="header-logo-container">
|
|
53
|
+
<img src={fullLogo} alt="logo">
|
|
54
|
+
</div>
|
|
55
|
+
</svelte:fragment>
|
|
56
|
+
<div
|
|
57
|
+
slot="drawer"
|
|
58
|
+
style:padding="0px 10px 10px 0px"
|
|
59
|
+
>
|
|
60
|
+
<SelectableMenuList
|
|
61
|
+
items={menuItems}
|
|
62
|
+
collapsed={false}
|
|
63
|
+
selected={selectedMenuElementName}
|
|
64
|
+
></SelectableMenuList>
|
|
65
|
+
</div>
|
|
66
|
+
</HeaderMenu>
|
|
67
|
+
</div>
|
|
68
|
+
<main
|
|
69
|
+
class="page-content"
|
|
70
|
+
class:collapsed={!drawerCollapsed}
|
|
71
|
+
class:expanded={drawerCollapsed}
|
|
72
|
+
>
|
|
73
|
+
<slot></slot>
|
|
74
|
+
</main>
|
|
75
|
+
</div>
|
|
76
|
+
</MediaQuery>
|
|
77
|
+
|
|
78
|
+
<style>
|
|
79
|
+
.sidebar {
|
|
80
|
+
position: fixed;
|
|
81
|
+
bottom: 0px;
|
|
82
|
+
top: 0px;
|
|
83
|
+
width: var(
|
|
84
|
+
--collapsible-side-bar-layout-sidebar-width,
|
|
85
|
+
var(--collapsible-side-bar-layout-default-sidebar-width)
|
|
86
|
+
);
|
|
87
|
+
transition: width .3s cubic-bezier(0.075, 0.82, 0.165, 1);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.sidebar.collapsed {
|
|
91
|
+
width: var(
|
|
92
|
+
--collapsible-side-bar-layout-sidebar-collapsed-width,
|
|
93
|
+
var(--collapsible-side-bar-layout-default-sidebar-collapsed-width)
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@media (max-width: 991.98px){
|
|
98
|
+
.sidebar {
|
|
99
|
+
visibility: hidden;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.page-content {
|
|
103
|
+
padding-top: 1rem;
|
|
104
|
+
padding-left: 1rem;
|
|
105
|
+
padding-right: 1rem;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@media (min-width: 992px){
|
|
110
|
+
.header-menu {
|
|
111
|
+
visibility: hidden;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.page-content {
|
|
115
|
+
margin-top: -3rem;
|
|
116
|
+
transition: padding-left .3s cubic-bezier(0.075, 0.82, 0.165, 1);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.page-content.expanded {
|
|
120
|
+
padding-left: 6rem
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.page-content.collapsed {
|
|
124
|
+
padding-left: 18rem
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.logo-container {
|
|
129
|
+
padding-left: 16px;
|
|
130
|
+
padding-top: 10px;
|
|
131
|
+
transition-property: width padding-left;
|
|
132
|
+
transition-timing-function: cubic-bezier(.4,0,.2,1);
|
|
133
|
+
transition-duration: var(--collapsible-side-bar-layout-collapse-transition-time);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.logo-container.collapsed {
|
|
137
|
+
padding-left: 0px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.logo-container img {
|
|
141
|
+
height: var(
|
|
142
|
+
--collapsible-side-bar-layout-logo-height,
|
|
143
|
+
var(--collapsible-side-bar-layout-default-logo-height)
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.header-logo-container {
|
|
148
|
+
display: flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.header-logo-container img {
|
|
153
|
+
height: 3rem;
|
|
154
|
+
}
|
|
155
|
+
</style>
|