@netlify/spark-ui 1.0.3-alpha.1 → 1.1.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/assets/SearchLink.css +1 -1
- package/dist/assets/SearchModal.css +1 -1
- package/dist/chunks/compat.module.DT16W4Wr.js +175 -0
- package/dist/chunks/hooks.module.CNV9mxng.js +138 -0
- package/dist/chunks/{useTimeout.DYuvQwFN.js → useTimeout.DOkYFG64.js} +1 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components/preact/Modal/Modal.js +1 -1
- package/dist/components/preact/SearchModal/components/SearchInput.d.ts +0 -2
- package/dist/components/preact/SearchModal/components/SearchInput.js +2 -2
- package/dist/components/preact/SearchModal/components/SearchLink/SearchLink.js +1 -1
- package/dist/components/preact/SearchModal/components/SearchModal/SearchModal.js +51 -81
- package/dist/components/preact/SearchModal/components/SearchToggle/SearchToggle.js +1 -1
- package/dist/components/preact/SearchModal/components/SearchWindow.d.ts +1 -1
- package/dist/components/preact/SearchModal/components/SearchWindow.js +34 -39
- package/dist/components/preact/SearchModal/hooks/useKeyboardNav.js +6 -6
- package/dist/components/preact/SearchModal/hooks/useSearch.js +2 -2
- package/dist/components/preact/SearchModal/hooks/useSearchHotkeys.js +1 -1
- package/dist/components/preact/SearchModal/hooks/useSearchLogger.js +1 -1
- package/dist/components/preact/SearchModal/hooks/useSearchParams.js +1 -1
- package/dist/components/preact/SearchModal/hooks/useSearchToggles.js +1 -1
- package/dist/components/preact/SearchModal/types/search.types.d.ts +0 -3
- package/dist/components/preact/index.d.ts +0 -1
- package/dist/components/preact/index.js +5 -7
- package/package.json +2 -4
- package/packages/components/Blockquote.astro +103 -0
- package/packages/components/index.ts +0 -1
- package/packages/components/preact/SearchModal/components/SearchInput.tsx +7 -9
- package/packages/components/preact/SearchModal/components/SearchLink/SearchLink.css +1 -6
- package/packages/components/preact/SearchModal/components/SearchModal/SearchModal.css +11 -67
- package/packages/components/preact/SearchModal/components/SearchModal/SearchModal.tsx +30 -67
- package/packages/components/preact/SearchModal/components/SearchWindow.tsx +16 -27
- package/packages/components/preact/SearchModal/hooks/useKeyboardNav.ts +2 -2
- package/packages/components/preact/SearchModal/types/search.types.tsx +1 -2
- package/packages/components/preact/index.ts +0 -1
- package/packages/styles/tokens.css +4 -4
- package/dist/assets/AskNetlify.css +0 -1
- package/dist/assets/Orb.css +0 -1
- package/dist/chunks/compat.module.BjTzMHXJ.js +0 -296
- package/dist/chunks/hooks.module.DeYLzLnU.js +0 -177
- package/dist/components/preact/AskNetlify/AskNetlify.d.ts +0 -2
- package/dist/components/preact/AskNetlify/AskNetlify.js +0 -5292
- package/dist/components/preact/Orb/Orb.d.ts +0 -2
- package/dist/components/preact/Orb/Orb.js +0 -5
- package/packages/components/preact/AskNetlify/AskNetlify.css +0 -162
- package/packages/components/preact/AskNetlify/AskNetlify.tsx +0 -123
- package/packages/components/preact/Orb/Orb.css +0 -94
- package/packages/components/preact/Orb/Orb.tsx +0 -7
|
@@ -1,53 +1,48 @@
|
|
|
1
|
-
import { u as
|
|
2
|
-
import { T as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const d = ({
|
|
8
|
-
searchLoading: l,
|
|
1
|
+
import { u as e } from "../../../../chunks/jsxRuntime.module.Bzuv3cXw.js";
|
|
2
|
+
import { T as o } from "../../../../chunks/hooks.module.CNV9mxng.js";
|
|
3
|
+
import t from "./SearchHeading/SearchHeading.js";
|
|
4
|
+
import a from "./SearchLink/SearchLink.js";
|
|
5
|
+
const h = ({
|
|
6
|
+
searchLoading: s,
|
|
9
7
|
searchTerm: r,
|
|
10
|
-
results:
|
|
8
|
+
results: n
|
|
11
9
|
}) => {
|
|
12
|
-
if (
|
|
13
|
-
return /* @__PURE__ */
|
|
10
|
+
if (s)
|
|
11
|
+
return /* @__PURE__ */ e(t, { children: [
|
|
14
12
|
"Searching for ",
|
|
15
|
-
/* @__PURE__ */
|
|
13
|
+
/* @__PURE__ */ e("span", { className: "n-search-term", children: r }),
|
|
16
14
|
" ..."
|
|
17
15
|
] });
|
|
18
|
-
if (!
|
|
19
|
-
return /* @__PURE__ */
|
|
16
|
+
if (!n || n.length === 0)
|
|
17
|
+
return /* @__PURE__ */ e(t, { children: [
|
|
20
18
|
"0 results for ",
|
|
21
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ e("span", { className: "n-search-term", children: r })
|
|
22
20
|
] });
|
|
23
|
-
const
|
|
24
|
-
return /* @__PURE__ */
|
|
21
|
+
const l = o(() => n.map((i, c) => /* @__PURE__ */ e("li", { className: "n-results-list-item", children: /* @__PURE__ */ e(a, { ...i }) }, c)), [n]);
|
|
22
|
+
return /* @__PURE__ */ e("ul", { className: "n-results-list", role: "list", children: l });
|
|
25
23
|
};
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
children: i
|
|
24
|
+
function p({
|
|
25
|
+
searchLoading: s,
|
|
26
|
+
searchTerm: r,
|
|
27
|
+
results: n,
|
|
28
|
+
children: l
|
|
32
29
|
}) {
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
"
|
|
30
|
+
return /* @__PURE__ */ e("div", { className: "n-search-window", children: /* @__PURE__ */ e("div", { className: "search-links", children: [
|
|
31
|
+
/* @__PURE__ */ e(a, { ...{
|
|
32
|
+
icon: "sparkles",
|
|
33
|
+
label: "Ask Netlify AI",
|
|
34
|
+
url: "https://docs.netlify.com/ask-netlify/"
|
|
35
|
+
} }),
|
|
36
|
+
r && r.length > 1 ? /* @__PURE__ */ e(
|
|
37
|
+
h,
|
|
36
38
|
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
children: [
|
|
42
|
-
/* @__PURE__ */ n("span", { className: "n-search-link-icon", children: /* @__PURE__ */ n(a, { name: "netlify" }) }),
|
|
43
|
-
/* @__PURE__ */ n("div", { className: "n-search-link-body", children: /* @__PURE__ */ n("p", { className: "n-search-link-title", children: "Ask Netlify AI" }) }),
|
|
44
|
-
/* @__PURE__ */ n("div", { className: "n-search-link-icon", children: /* @__PURE__ */ n(a, { name: "caretRight" }) })
|
|
45
|
-
]
|
|
39
|
+
searchLoading: s,
|
|
40
|
+
searchTerm: r,
|
|
41
|
+
results: n
|
|
46
42
|
}
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
] }) : null }) });
|
|
43
|
+
) : l || null
|
|
44
|
+
] }) });
|
|
50
45
|
}
|
|
51
46
|
export {
|
|
52
|
-
|
|
47
|
+
p as default
|
|
53
48
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { y as
|
|
2
|
-
function
|
|
3
|
-
|
|
1
|
+
import { y as l } from "../../../../chunks/hooks.module.CNV9mxng.js";
|
|
2
|
+
function s(r, t, o, c) {
|
|
3
|
+
l(() => {
|
|
4
4
|
if (!r) return;
|
|
5
5
|
const u = (e) => {
|
|
6
6
|
if (o) {
|
|
@@ -12,8 +12,8 @@ function k(r, t, o, c) {
|
|
|
12
12
|
e.preventDefault();
|
|
13
13
|
const d = t.current;
|
|
14
14
|
if (!d) return;
|
|
15
|
-
const n = Array.from(d.querySelectorAll("
|
|
16
|
-
n[
|
|
15
|
+
const n = Array.from(d.querySelectorAll("a")), y = n.findIndex((i) => i === document.activeElement), f = e.key === "ArrowDown" ? (y + 1) % n.length : (y - 1 + n.length) % n.length;
|
|
16
|
+
n[f].focus();
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
};
|
|
@@ -21,5 +21,5 @@ function k(r, t, o, c) {
|
|
|
21
21
|
}, [r, t, o, c]);
|
|
22
22
|
}
|
|
23
23
|
export {
|
|
24
|
-
|
|
24
|
+
s as useKeyboardNav
|
|
25
25
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as g, A as w } from "../../../../chunks/hooks.module.
|
|
2
|
-
import { u as S } from "../../../../chunks/useTimeout.
|
|
1
|
+
import { d as g, A as w } from "../../../../chunks/hooks.module.CNV9mxng.js";
|
|
2
|
+
import { u as S } from "../../../../chunks/useTimeout.DOkYFG64.js";
|
|
3
3
|
function x() {
|
|
4
4
|
const [l, r] = g({
|
|
5
5
|
searchTerm: "",
|
|
@@ -4,6 +4,5 @@ export { default as Icon } from './Icon';
|
|
|
4
4
|
export { default as SearchLink } from './SearchModal/components/SearchLink/SearchLink';
|
|
5
5
|
export { default as SearchHeading } from './SearchModal/components/SearchHeading/SearchHeading';
|
|
6
6
|
export { default as SearchToggle } from './SearchModal/components/SearchToggle/SearchToggle';
|
|
7
|
-
export { default as AskNetlify } from './AskNetlify/AskNetlify';
|
|
8
7
|
export { SearchModal } from './SearchModal';
|
|
9
8
|
export { type IconName } from './Icon';
|
|
@@ -3,18 +3,16 @@ import { default as d } from "./Modal/Modal.js";
|
|
|
3
3
|
import { default as m } from "./Icon/index.js";
|
|
4
4
|
import { default as s } from "./SearchModal/components/SearchLink/SearchLink.js";
|
|
5
5
|
import { default as x } from "./SearchModal/components/SearchHeading/SearchHeading.js";
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as S } from "./AskNetlify/AskNetlify.js";
|
|
6
|
+
import { default as h } from "./SearchModal/components/SearchToggle/SearchToggle.js";
|
|
8
7
|
import "preact";
|
|
9
|
-
import "../../chunks/hooks.module.
|
|
10
|
-
import { default as
|
|
8
|
+
import "../../chunks/hooks.module.CNV9mxng.js";
|
|
9
|
+
import { default as S } from "./SearchModal/components/SearchModal/SearchModal.js";
|
|
11
10
|
export {
|
|
12
|
-
S as AskNetlify,
|
|
13
11
|
m as Icon,
|
|
14
12
|
t as KeyboardKey,
|
|
15
13
|
d as Modal,
|
|
16
14
|
x as SearchHeading,
|
|
17
15
|
s as SearchLink,
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
S as SearchModal,
|
|
17
|
+
h as SearchToggle
|
|
20
18
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/spark-ui",
|
|
3
3
|
"description": "Assets, design tokens, components, and utilities",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/components/preact/index.js",
|
|
7
7
|
"types": "dist/components/preact/index.d.ts",
|
|
@@ -33,11 +33,9 @@
|
|
|
33
33
|
"./analytics": "./packages/analytics/index.ts"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@kapaai/react-sdk": "^0.0.5",
|
|
37
36
|
"@preact/preset-vite": "^2.10.1",
|
|
38
37
|
"@shikijs/transformers": "^3.3.0",
|
|
39
38
|
"glob": "^11.0.1",
|
|
40
|
-
"marked": "^15.0.11",
|
|
41
39
|
"preact": "^10.26.4",
|
|
42
40
|
"vite": "^6.2.5",
|
|
43
41
|
"vite-plugin-dts": "^4.5.3",
|
|
@@ -66,4 +64,4 @@
|
|
|
66
64
|
"prettier": "^3.5.3",
|
|
67
65
|
"prettier-plugin-astro": "^0.14.1"
|
|
68
66
|
}
|
|
69
|
-
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
interface Props {
|
|
3
|
+
quote?: string;
|
|
4
|
+
author?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
variant?: 'default' | 'simple';
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { quote, variant = 'default', author, title, class: className, ...rest } = Astro.props;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* If quote is added via <slot />, trim surrounding whitespace so that quotation marks properly wrap inline with the text string.
|
|
13
|
+
* Also set prettier-ignore to prevent wrapping of <blockquote> contents which can produce whitespace.
|
|
14
|
+
*/
|
|
15
|
+
let html = '';
|
|
16
|
+
if (Astro.slots.has('default')) {
|
|
17
|
+
html = await Astro.slots.render('default');
|
|
18
|
+
html = html.trim();
|
|
19
|
+
}
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
<figure class={className} data-blockquote-variant={variant} {...rest}>
|
|
23
|
+
<!-- prettier-ignore -->
|
|
24
|
+
<blockquote>{quote ? quote : <Fragment set:html={html} />}</blockquote>
|
|
25
|
+
{
|
|
26
|
+
author || title ? (
|
|
27
|
+
<figcaption>
|
|
28
|
+
{author && <span>{author}</span>}
|
|
29
|
+
{title && <span>{title}</span>}
|
|
30
|
+
</figcaption>
|
|
31
|
+
) : null
|
|
32
|
+
}
|
|
33
|
+
</figure>
|
|
34
|
+
|
|
35
|
+
<style>
|
|
36
|
+
figure {
|
|
37
|
+
--_gap: var(--space-s);
|
|
38
|
+
display: grid;
|
|
39
|
+
gap: var(--_gap);
|
|
40
|
+
padding-inline-start: var(--_gap);
|
|
41
|
+
border-inline-start: 3px solid var(--color-icon);
|
|
42
|
+
font-size: var(--font-size-display-2xs);
|
|
43
|
+
font-family: var(--font-family-display);
|
|
44
|
+
font-weight: var(--font-weight-bold);
|
|
45
|
+
line-height: var(--line-height-heading);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
blockquote {
|
|
49
|
+
quotes: '“' '”' '‘' '’';
|
|
50
|
+
text-indent: -0.45em; /* Adjusts for hanging punctuation */
|
|
51
|
+
text-wrap: pretty;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@supports (hanging-punctuation: first) {
|
|
55
|
+
blockquote {
|
|
56
|
+
text-indent: 0;
|
|
57
|
+
hanging-punctuation: first;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
blockquote::before {
|
|
62
|
+
content: open-quote;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
blockquote::after {
|
|
66
|
+
content: close-quote;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
figcaption {
|
|
70
|
+
display: flex;
|
|
71
|
+
gap: 0.2em;
|
|
72
|
+
font-size: var(--font-size-text-xs);
|
|
73
|
+
line-height: var(--line-height-heading);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Variants */
|
|
77
|
+
[data-blockquote-variant='default'] {
|
|
78
|
+
figcaption {
|
|
79
|
+
flex-direction: column;
|
|
80
|
+
font-weight: var(--font-weight-regular);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
figcaption > * {
|
|
84
|
+
display: block;
|
|
85
|
+
font-family: var(--font-family-mono);
|
|
86
|
+
text-transform: uppercase;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
figcaption > *:last-child:not(:only-child) {
|
|
90
|
+
color: var(--color-text-weak);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
[data-blockquote-variant='simple'] {
|
|
95
|
+
figcaption > * {
|
|
96
|
+
font-size: var(--font-size-text-sm);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
figcaption > *:not(:last-child)::after {
|
|
100
|
+
content: ',';
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
</style>
|
|
@@ -6,5 +6,4 @@ export { default as SearchLink } from './preact/SearchModal/components/SearchLin
|
|
|
6
6
|
export { default as SearchHeading } from './preact/SearchModal/components/SearchHeading/SearchHeading';
|
|
7
7
|
export { default as SearchToggle } from './preact/SearchModal/components/SearchToggle/SearchToggle';
|
|
8
8
|
export { default as SearchModal } from './preact/SearchModal/components/SearchModal/SearchModal';
|
|
9
|
-
export { default as ChatApp } from './preact/ChatApp/ChatApp';
|
|
10
9
|
export { type IconName } from './preact/Icon';
|
|
@@ -6,22 +6,20 @@ interface Props {
|
|
|
6
6
|
setSearchTerm: (term: string) => void;
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
initialValue?: string;
|
|
9
|
-
isGeneratingAnswer?: boolean;
|
|
10
|
-
isPreparingAnswer?: boolean;
|
|
11
9
|
}
|
|
12
10
|
|
|
13
11
|
const SearchInput = (props: Props) => {
|
|
14
12
|
const [value, setValue] = useState<string>('');
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
const { reset, run } = useTimeout((query: string) => {
|
|
15
|
+
props.setSearchTerm(query);
|
|
16
|
+
}, 300);
|
|
17
|
+
|
|
18
|
+
const handleInput = (e: InputEvent) => {
|
|
21
19
|
const target = e.target as HTMLInputElement;
|
|
22
20
|
setValue(target.value);
|
|
23
|
-
reset()
|
|
24
|
-
run(target.value)
|
|
21
|
+
reset()
|
|
22
|
+
run(target.value)
|
|
25
23
|
};
|
|
26
24
|
|
|
27
25
|
useEffect(() => {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
.n-search-link {
|
|
2
2
|
--n-search-icon-size: 1em;
|
|
3
|
-
|
|
4
|
-
box-sizing: border-box;
|
|
3
|
+
all: unset;
|
|
5
4
|
display: flex;
|
|
6
5
|
justify-content: space-between;
|
|
7
6
|
flex-wrap: wrap;
|
|
@@ -12,10 +11,6 @@
|
|
|
12
11
|
font-weight: var(--font-weight-regular);
|
|
13
12
|
text-decoration: none;
|
|
14
13
|
cursor: pointer;
|
|
15
|
-
width: 100%;
|
|
16
|
-
border: none;
|
|
17
|
-
text-align: left;
|
|
18
|
-
outline: none;
|
|
19
14
|
}
|
|
20
15
|
|
|
21
16
|
.n-search-link-body {
|
|
@@ -4,18 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
/* Root Variables */
|
|
6
6
|
.n-search-modal {
|
|
7
|
-
--n-search-padding-inline:
|
|
7
|
+
--n-search-padding-inline: 0.5em;
|
|
8
8
|
--n-search-color-text: var(--color-text, currentColor);
|
|
9
9
|
--n-search-color-text-secondary: var(--color-text-weak, currentColor);
|
|
10
10
|
--n-search-color-bg: var(--color-bg);
|
|
11
11
|
--n-search-color-bg-2: var(--color-bg-2);
|
|
12
12
|
--n-search-color-border: var(--color-bg-3);
|
|
13
|
-
--n-search-border-radius:
|
|
13
|
+
--n-search-border-radius: 8px;
|
|
14
14
|
--n-search-max-w: 600px;
|
|
15
15
|
--n-search-text-highlight: var(--color-text-accent);
|
|
16
|
-
--n-search-input-height: 50px;
|
|
17
|
-
--n-search-footer-height: 40px;
|
|
18
|
-
--n-search-container-height: 400px;
|
|
19
16
|
}
|
|
20
17
|
|
|
21
18
|
.n-search-modal {
|
|
@@ -26,30 +23,11 @@
|
|
|
26
23
|
margin: auto;
|
|
27
24
|
}
|
|
28
25
|
|
|
29
|
-
.n-search-modal::after {
|
|
30
|
-
content: '';
|
|
31
|
-
display: block;
|
|
32
|
-
width: 100%;
|
|
33
|
-
height: 100%;
|
|
34
|
-
background: blue;
|
|
35
|
-
position: absolute;
|
|
36
|
-
z-index: 0;
|
|
37
|
-
inset: 0;
|
|
38
|
-
transform-origin: center;
|
|
39
|
-
transform: scale(0);
|
|
40
|
-
border-radius: var(--radius-m);
|
|
41
|
-
transition: transform 300ms ease-in-out;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.n-search-modal-ask {
|
|
45
|
-
--n-search-max-w: 800px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
26
|
.n-search-container {
|
|
49
27
|
--mark-bg: var(--n-search-text-highlight);
|
|
50
28
|
display: grid;
|
|
51
29
|
width: min(var(--n-search-max-w), 100%);
|
|
52
|
-
|
|
30
|
+
min-height: 470px;
|
|
53
31
|
background-color: var(--n-search-color-bg);
|
|
54
32
|
border-radius: var(--n-search-border-radius);
|
|
55
33
|
overflow: hidden;
|
|
@@ -65,15 +43,13 @@
|
|
|
65
43
|
}
|
|
66
44
|
|
|
67
45
|
.n-search-input-wrapper {
|
|
68
|
-
|
|
69
|
-
position: relative;
|
|
46
|
+
all: unset;
|
|
70
47
|
display: flex;
|
|
71
48
|
width: 100%;
|
|
72
|
-
|
|
49
|
+
border-bottom: 1px solid var(--n-search-color-border);
|
|
73
50
|
}
|
|
74
51
|
|
|
75
52
|
.n-search-input {
|
|
76
|
-
position: relative;
|
|
77
53
|
display: inline-flex;
|
|
78
54
|
box-sizing: border-box;
|
|
79
55
|
background: var(--n-search-color-bg);
|
|
@@ -87,25 +63,13 @@
|
|
|
87
63
|
color: var(--color-text);
|
|
88
64
|
}
|
|
89
65
|
|
|
90
|
-
.n-search-input-wrapper::after,
|
|
91
|
-
.n-search-footer::after {
|
|
92
|
-
content: '';
|
|
93
|
-
display: block;
|
|
94
|
-
width: 200%;
|
|
95
|
-
height: 1px;
|
|
96
|
-
background: var(--n-search-color-border);
|
|
97
|
-
position: absolute;
|
|
98
|
-
bottom: 0;
|
|
99
|
-
left: 0;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
66
|
.n-search-input::placeholder {
|
|
103
67
|
color: var(--n-search-color-text);
|
|
104
68
|
}
|
|
105
69
|
|
|
106
70
|
.n-search-label {
|
|
107
71
|
display: flex;
|
|
108
|
-
padding-inline
|
|
72
|
+
padding-inline: var(--n-search-padding-inline);
|
|
109
73
|
align-items: center;
|
|
110
74
|
}
|
|
111
75
|
|
|
@@ -128,7 +92,7 @@
|
|
|
128
92
|
|
|
129
93
|
/* Search Results */
|
|
130
94
|
.n-search-window {
|
|
131
|
-
height:
|
|
95
|
+
height: 400px;
|
|
132
96
|
overflow-x: hidden;
|
|
133
97
|
overflow-y: auto;
|
|
134
98
|
overscroll-behavior: contain;
|
|
@@ -151,15 +115,11 @@ ul[role='list'] {
|
|
|
151
115
|
|
|
152
116
|
/* Footer */
|
|
153
117
|
.n-search-footer {
|
|
154
|
-
|
|
118
|
+
border-top: 1px solid var(--n-search-color-border);
|
|
119
|
+
padding: var(--space-2xs) var(--space-s);
|
|
120
|
+
background: var(--color-bg-2);
|
|
155
121
|
display: flex;
|
|
156
122
|
gap: var(--space-m);
|
|
157
|
-
padding: var(--space-2xs) var(--space-s);
|
|
158
|
-
height: var(--n-search-footer-height);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.n-search-footer::after {
|
|
162
|
-
top: 0;
|
|
163
123
|
}
|
|
164
124
|
|
|
165
125
|
.n-search-footer-tip {
|
|
@@ -174,8 +134,7 @@ ul[role='list'] {
|
|
|
174
134
|
.n-search-modal {
|
|
175
135
|
transition:
|
|
176
136
|
display 0.2s allow-discrete,
|
|
177
|
-
overlay 0.2s allow-discrete
|
|
178
|
-
width 0.3s ease-in-out;
|
|
137
|
+
overlay 0.2s allow-discrete;
|
|
179
138
|
animation: closeSearch 0.2s forwards;
|
|
180
139
|
}
|
|
181
140
|
|
|
@@ -183,21 +142,6 @@ ul[role='list'] {
|
|
|
183
142
|
animation: openSearch 0.2s forwards;
|
|
184
143
|
}
|
|
185
144
|
|
|
186
|
-
.n-search-modal[data-state='search'] > * {
|
|
187
|
-
opacity: 0;
|
|
188
|
-
animation: appearContainer 300ms ease-in-out forwards;
|
|
189
|
-
animation-delay: 300ms;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
@keyframes appearContainer {
|
|
193
|
-
0% {
|
|
194
|
-
opacity: 0;
|
|
195
|
-
}
|
|
196
|
-
100% {
|
|
197
|
-
opacity: 1;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
145
|
@keyframes openSearch {
|
|
202
146
|
from {
|
|
203
147
|
opacity: 0;
|