timvir 0.2.2 → 0.2.5
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/blocks/Arbitrary/Arbitrary.d.ts +1 -1
- package/blocks/Arbitrary/index.js +4 -22
- package/blocks/Arbitrary/samples/basic.d.ts +1 -1
- package/blocks/Arbitrary/styles.css +1 -0
- package/blocks/Code/index.js +3 -8
- package/blocks/Code/samples/basic.d.ts +1 -1
- package/blocks/Code/styles.css +3 -1
- package/blocks/ColorBar/index.js +2 -7
- package/blocks/ColorBar/styles.css +1 -0
- package/blocks/ColorBook/index.js +0 -5
- package/blocks/ColorBook/styles.css +1 -0
- package/blocks/Cover/index.js +2 -6
- package/blocks/Cover/styles.css +1 -0
- package/blocks/Exhibit/Exhibit.d.ts +1 -1
- package/blocks/Exhibit/index.js +2 -6
- package/blocks/Exhibit/styles.css +1 -0
- package/blocks/Font/index.js +6 -9
- package/blocks/Font/samples/basic.d.ts +1 -1
- package/blocks/Font/styles.css +1 -0
- package/blocks/Grid/Grid.d.ts +1 -1
- package/blocks/Grid/index.js +0 -5
- package/blocks/Grid/styles.css +1 -0
- package/blocks/Icon/Icon.d.ts +1 -1
- package/blocks/Icon/index.js +1 -13
- package/blocks/Icon/styles.css +4 -2
- package/blocks/Icon/types.d.ts +1 -1
- package/blocks/Message/index.js +0 -5
- package/blocks/Message/samples/basic.d.ts +1 -1
- package/blocks/Message/styles.css +1 -0
- package/blocks/Swatch/index.js +0 -5
- package/blocks/Swatch/styles.css +1 -0
- package/blocks/Viewport/index.js +3 -20
- package/blocks/Viewport/styles.css +10 -6
- package/blocks/WebLink/index.js +0 -7
- package/blocks/WebLink/samples/basic.d.ts +1 -1
- package/blocks/WebLink/styles.css +1 -0
- package/blocks/styles.css +27 -9
- package/bus/index.d.ts +1 -1
- package/bus/index.js +1 -1
- package/bus/messages.d.ts +1 -1
- package/bus/styles.css +1 -0
- package/context/index.d.ts +3 -3
- package/context/index.js +0 -2
- package/context/styles.css +1 -0
- package/core/components/Footer/samples/basic.d.ts +1 -1
- package/core/components/NavigationFooter/samples/basic.d.ts +1 -1
- package/core/components/Page/Page.d.ts +4 -4
- package/core/index.js +42 -164
- package/core/styles.css +32 -21
- package/hooks/index.js +3 -10
- package/hooks/styles.css +1 -0
- package/hooks/useResizeObserver/index.d.ts +1 -1
- package/package.json +2 -2
- package/search/SearchBoxInput/SearchBoxInput.d.ts +1 -1
- package/search/SearchBoxListItem/SearchBoxListItem.d.ts +1 -1
- package/search/index.js +15 -31
- package/search/styles.css +9 -6
- package/styles.css +71 -36
package/core/styles.css
CHANGED
|
@@ -2,17 +2,34 @@
|
|
|
2
2
|
.g1et32pl{display:grid;--timvir-page-margin:16px;grid-auto-rows:min-content;grid-template-columns:[le] var(--timvir-page-margin) [lex lc] 1fr [rc rex] var(--timvir-page-margin) [re];}@media (min-width:48rem){.g1et32pl{--timvir-page-margin:24px;grid-template-columns:[le] var(--timvir-page-margin) [lex] 1fr [lc] minmax(0,48rem) [rc] 1fr [rex] var( --timvir-page-margin ) [re];}}@media (min-width:72rem){.g1et32pl{grid-template-columns:[le] 1fr var(--timvir-page-margin) [lex] minmax(0,12rem) [lc] 48rem [rc] minmax(0,12rem) [rex] var( --timvir-page-margin ) 1fr [re];}}.g1et32pl > *:not(.nc2e9vn){grid-column:lc / rc;min-width:0;}
|
|
3
3
|
.en6sn9p{grid-column:lex / rex;}
|
|
4
4
|
.f3c539b{grid-column:le / re;}
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
.rwhrdvg{padding:50px 0 30px;background:#20232a;color:white;display:grid;gap:50px;}
|
|
7
7
|
.l1u1x7q7{display:grid;grid-template-columns:repeat(auto-fill,minmax(234px,1fr));grid-gap:32px;}
|
|
8
8
|
.l1x5jo3a{text-transform:uppercase;color:var(--timvir-secondary-text-color);font-weight:700;letter-spacing:0.08em;margin-bottom:12px;}
|
|
9
9
|
.l29wcr8{display:block;color:white;text-decoration:none;}.l29wcr8:hover{color:var(--c-p-4);}
|
|
10
10
|
.m1ojti9g{color:var(--timvir-secondary-text-color);}.m1ojti9g a{color:currentColor;text-decoration:none;background-image:linear-gradient(transparent,transparent 5px,#383838 5px,#383838);background-position:bottom;background-size:100% 6px;background-repeat:repeat-x;}.m1ojti9g a:hover{background-image:linear-gradient(transparent,transparent 3px,#2bbc8a 3px,#2bbc8a);}
|
|
11
|
-
|
|
12
|
-
.
|
|
13
|
-
|
|
14
|
-
.
|
|
15
|
-
.
|
|
11
|
+
|
|
12
|
+
.t1amubg3{font-family:system-ui,sans-serif;font-feature-settings:"liga","kern";text-rendering:optimizelegibility;font-size:16px;line-height:1.725;background-color:var(--timvir-background-color);color:var(--timvir-text-color);--c-p-0:#f0fcf6;--c-p-1:#d1f6e4;--c-p-2:#a0dbc1;--c-p-3:#61c19f;--c-p-4:#38a585;--c-p-5:#1b896b;}:root{box-sizing:border-box;}*,*:before,*:after{box-sizing:inherit;}:root{--timvir-background-color:#ffffff;--timvir-text-color:#000000d9;--timvir-secondary-text-color:#00000066;--timvir-sidebar-background-color:#f0fcf6;--timvir-sidebar-text-color:#000000d9;--timvir-sidebar-highlight-color:rgb(216,226,221);--timvir-accent-color:#38a585;}:root[data-timvir-theme="dark"]{--timvir-background-color:#1f2023;--timvir-text-color:rgba(255 255 255 / 0.86);--timvir-secondary-text-color:rgba(255 255 255 / 0.56);--timvir-sidebar-background-color:#1b1c1e;--timvir-sidebar-text-color:rgba(255 255 255 / 0.86);--timvir-sidebar-highlight-color:rgb(55,57,61);--timvir-accent-color:#38a585;}
|
|
13
|
+
|
|
14
|
+
.ru1mblv{background-color:transparent;color:rgb(214,214,214);white-space:nowrap;display:flex;flex:0 0 100%;align-items:center;transition:color 0.1s;height:46px;display:flex;flex-shrink:initial;flex-basis:initial;flex-direction:row;flex-grow:1;overflow:hidden;align-items:center;padding-inline:14px;border-left:none;cursor:default;}.ru1mblv:hover{background-color:rgb(55,55,60);}
|
|
15
|
+
.i1wyx06o{margin-right:12px;width:16px;}.i1wyx06o > svg{display:block;width:16px;height:16px;}
|
|
16
|
+
.legxg01{font-size:0.8125rem;color:rgb(247,248,248);}
|
|
17
|
+
|
|
18
|
+
.r1fo6voy{position:relative;display:flex;flex-direction:column;flex-shrink:1;flex-grow:1;min-width:min-content;will-change:transform;transform-origin:center center;background:linear-gradient(136.61deg,rgb(39,40,43) 13.72%,rgb(45,46,49) 74.3%);border-radius:8px;box-shadow:rgb(0 0 0 / 50%) 0px 16px 70px;max-width:640px;color:rgb(214,214,214);overflow:hidden;transition:opacity 0.2s,transform 0.2s;}
|
|
19
|
+
.c185xiij{margin:16px 16px 0px;height:25px;line-height:25px;padding:0px 8px;font-size:0.8em;flex-shrink:0;align-self:flex-start;color:rgb(138,143,152);background:rgb(49,50,54);border-radius:4px;max-width:calc(100vw - 60px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
|
|
20
|
+
.p1ky3ya3{border-bottom:1px solid rgb(49,50,54);display:grid;grid-template-columns:1fr;align-items:center;position:relative;flex-shrink:0;height:62px;}.p1ky3ya3 > input{padding:20px;grid-area:1 / 1 / auto / auto;margin:0px;border:none;appearance:none;font-size:inherit;height:62px;background:transparent;color:rgb(214,214,214);caret-color:rgb(110,94,210);outline:none;width:100%;}
|
|
21
|
+
.snq1o7g{background:rgba(247,247,248,0.03);height:24px;padding-inline:14px;font-size:0.75rem;color:rgb(129,128,142);}
|
|
22
|
+
.cchvluj{height:300px;overflow:auto;}
|
|
23
|
+
|
|
24
|
+
.rfei6z8{position:fixed;inset:0px;display:flex;z-index:900;align-items:flex-start;justify-content:center;padding:13vh 16px 16px;font-family:system-ui,sans-serif;font-feature-settings:"liga","kern";text-rendering:optimizelegibility;font-size:16px;line-height:1.725;}
|
|
25
|
+
|
|
26
|
+
.re625n1{padding:50px 0;background:#282c34;color:white;display:grid;grid-auto-rows:min-content;grid-template-columns:[le] 16px [lex lc] 1fr [rc rex] 16px [re];}@media (min-width:48rem){.re625n1{grid-template-columns:[le] 24px [lex] 1fr [lc] minmax(0,48rem) [rc] 1fr [rex] 24px [re];}}@media (min-width:72rem){.re625n1{grid-template-columns:[le] 1fr 24px [lex] minmax(0,12rem) [lc] 48rem [rc] minmax(0,12rem) [rex] 24px 1fr [re];}}.re625n1 > *{grid-column:lc / rc;}
|
|
27
|
+
.d19gj27w{display:flex;align-items:flex-start;justify-content:space-between;}
|
|
28
|
+
.d15ohs1l{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;text-align:left;}
|
|
29
|
+
.dczrd9z{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;text-align:right;}
|
|
30
|
+
.lifnzb8{font-size:1.2rem;color:inherit;text-decoration:none;}.lifnzb8:hover{color:var(--c-p-3);}
|
|
31
|
+
.dymvrdu{opacity:0.5;}
|
|
32
|
+
|
|
16
33
|
.a12hs2f7{position:absolute;top:0em;left:-0.8em;color:var(--timvir-accent-color);font-weight:bold;font-size:1em;text-decoration:none;}@media (min-width:48rem){.a12hs2f7{top:-0.1em;left:-0.9em;font-size:1.1em;}}
|
|
17
34
|
.h31avqb{display:block;margin-top:3rem;margin-bottom:1rem;color:var(--timvir-accent-color);letter-spacing:0.01em;font-style:normal;font-size:36px;font-weight:600;text-indent:-0.05em;}
|
|
18
35
|
.h6ceq1b{position:relative;display:block;margin-top:2rem;margin-bottom:0.5rem;text-transform:none;letter-spacing:normal;font-size:24px;font-weight:500;}
|
|
@@ -31,15 +48,10 @@
|
|
|
31
48
|
.p1d7vdmn{margin:0 0 1rem;}
|
|
32
49
|
.ugfnift{margin:0 0 1rem;}
|
|
33
50
|
.o3pt2dg{margin:0 0 1rem;}
|
|
34
|
-
|
|
35
|
-
.re625n1{padding:50px 0;background:#282c34;color:white;display:grid;grid-auto-rows:min-content;grid-template-columns:[le] 16px [lex lc] 1fr [rc rex] 16px [re];}@media (min-width:48rem){.re625n1{grid-template-columns:[le] 24px [lex] 1fr [lc] minmax(0,48rem) [rc] 1fr [rex] 24px [re];}}@media (min-width:72rem){.re625n1{grid-template-columns:[le] 1fr 24px [lex] minmax(0,12rem) [lc] 48rem [rc] minmax(0,12rem) [rex] 24px 1fr [re];}}.re625n1 > *{grid-column:lc / rc;}
|
|
36
|
-
.d19gj27w{display:flex;align-items:flex-start;justify-content:space-between;}
|
|
37
|
-
.d15ohs1l{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;text-align:left;}
|
|
38
|
-
.dczrd9z{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-start;text-align:right;}
|
|
39
|
-
.aifnzb8{font-size:1.2rem;color:inherit;text-decoration:none;}.aifnzb8:hover{color:var(--c-p-3);}
|
|
40
|
-
.dymvrdu{opacity:0.5;}
|
|
51
|
+
|
|
41
52
|
|
|
42
53
|
.njdy1am{display:flex;align-items:center;margin:1px 0;padding:0 16px;}.njdy1am > a{transition:background 0.16s;border-radius:4px;display:inline-flex;align-items:center;color:var(--timvir-sidebar-text-color);font-size:14px;line-height:1.725;background:none;text-decoration:none;width:100%;padding:0 6px;height:27px;}.njdy1am:hover a{background-color:var(--timvir-sidebar-highlight-color);}.njdy1am[data-active="true"] a{background-color:var(--timvir-sidebar-highlight-color);}
|
|
54
|
+
|
|
43
55
|
.d17eoe18{display:none;height:0;}@media (min-width:60rem){.d17eoe18{display:flex;flex-direction:column;height:100%;}}
|
|
44
56
|
.d1mgn6rc{padding:24px 3px 24px;flex-shrink:0;transition:all 0.16s;}
|
|
45
57
|
.d7bx8iu{box-shadow:0 1px 0 rgba(16,22,26,0.15);}
|
|
@@ -47,11 +59,10 @@
|
|
|
47
59
|
.s1f74255{padding:24px 3px 30px;overflow-y:auto;flex-grow:1;overscroll-behavior:contain;}
|
|
48
60
|
.d5l3c45{font-family:system-ui;}
|
|
49
61
|
.d15ju3pv{color:var(--timvir-text-color);font-size:14px;font-weight:500;line-height:1.725;cursor:pointer;padding:2px 24px;border-radius:3px;display:flex;align-items:center;}.d15ju3pv:hover{background:var(--timvir-sidebar-highlight-color);}.d15ju3pv > svg{display:block;margin-right:4px;}
|
|
50
|
-
|
|
51
|
-
.
|
|
52
|
-
.
|
|
53
|
-
.
|
|
54
|
-
.
|
|
55
|
-
.
|
|
56
|
-
|
|
57
|
-
.cchvluj{height:300px;overflow:auto;}
|
|
62
|
+
|
|
63
|
+
.rfhjyp1{min-height:100vh;display:grid;grid-template-columns:[l] 0 [m] 1fr [r];}@media (min-width:60rem){.rfhjyp1{grid-template-columns:[l] 300px [m] 1fr [r];}}
|
|
64
|
+
.d1pp8z35{background-color:var(--timvir-sidebar-background-color);grid-column:l / m;}
|
|
65
|
+
.dxk1fgw{display:flex;flex-direction:column;grid-column:m / r;}
|
|
66
|
+
.d2srpki{margin-top:auto;}
|
|
67
|
+
.d1hkiw6l{margin-top:auto;padding-top:80px;}
|
|
68
|
+
|
package/hooks/index.js
CHANGED
|
@@ -9,7 +9,6 @@ import * as React from 'react';
|
|
|
9
9
|
* > const ro = useResizeObserver(entries => { console.log(entries); });
|
|
10
10
|
* > React.useEffect(() => { ro.observe(document.body) }, [])
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
12
|
function useResizeObserver(callback) {
|
|
14
13
|
const [ref] = React.useState(() => ({
|
|
15
14
|
ro: mkResizeObserver((...args) => ref.callback(...args)),
|
|
@@ -18,6 +17,7 @@ function useResizeObserver(callback) {
|
|
|
18
17
|
ref.callback = callback;
|
|
19
18
|
return ref.ro;
|
|
20
19
|
}
|
|
20
|
+
|
|
21
21
|
/**
|
|
22
22
|
* A convenience wrapper around 'useResizeObserver' which returns a React Ref that you can
|
|
23
23
|
* attach to elements. It is still your responsibility to do something sensible in the
|
|
@@ -26,11 +26,11 @@ function useResizeObserver(callback) {
|
|
|
26
26
|
* > const ref = useResizeObserverRef(entries => { console.log(entries); });
|
|
27
27
|
* > <div ref={ref} />
|
|
28
28
|
*/
|
|
29
|
-
|
|
30
29
|
function useResizeObserverRef(callback) {
|
|
31
30
|
const ro = useResizeObserver(callback);
|
|
32
31
|
return React.useCallback(el => el ? ro.observe(el) : ro.disconnect(), [ro]);
|
|
33
32
|
}
|
|
33
|
+
|
|
34
34
|
/**
|
|
35
35
|
* This hook returns a ref (that you can attach to elements) and a a list of all resize observer
|
|
36
36
|
* entries that were delivered during the most recent tick.
|
|
@@ -38,11 +38,11 @@ function useResizeObserverRef(callback) {
|
|
|
38
38
|
* > const [ref, entries] = useResizeObserverEntries()
|
|
39
39
|
* > <div ref={ref}>{entries.length}</div>
|
|
40
40
|
*/
|
|
41
|
-
|
|
42
41
|
function useResizeObserverEntries() {
|
|
43
42
|
const [entries, setEntries] = React.useState([]);
|
|
44
43
|
return [useResizeObserverRef(setEntries), entries];
|
|
45
44
|
}
|
|
45
|
+
|
|
46
46
|
/**
|
|
47
47
|
* A wrapper around 'useResizeObserverEntries' which only provides the last ResizeObserverEntry.
|
|
48
48
|
* Useful when observing a single element.
|
|
@@ -50,23 +50,16 @@ function useResizeObserverEntries() {
|
|
|
50
50
|
* > const [ref, entry] = useResizeObserverEntry()
|
|
51
51
|
* > <div ref={ref}>{entry?.contentRect.width}</div>
|
|
52
52
|
*/
|
|
53
|
-
|
|
54
53
|
function useResizeObserverEntry() {
|
|
55
54
|
const [ref, entries] = useResizeObserverEntries();
|
|
56
55
|
return [ref, last(entries)];
|
|
57
56
|
}
|
|
58
|
-
|
|
59
57
|
const last = a => a[a.length - 1];
|
|
60
|
-
|
|
61
58
|
const nopResizeObserver = {
|
|
62
59
|
observe() {},
|
|
63
|
-
|
|
64
60
|
unobserve() {},
|
|
65
|
-
|
|
66
61
|
disconnect() {}
|
|
67
|
-
|
|
68
62
|
};
|
|
69
|
-
|
|
70
63
|
const mkResizeObserver = callback => typeof ResizeObserver === "undefined" ? nopResizeObserver : new ResizeObserver(callback);
|
|
71
64
|
|
|
72
65
|
export { useResizeObserver, useResizeObserverEntries, useResizeObserverEntry, useResizeObserverRef };
|
package/hooks/styles.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -48,7 +48,7 @@ interface ResizeObserverEntry {
|
|
|
48
48
|
readonly borderBoxSize: ResizeObserverSize;
|
|
49
49
|
readonly contentBoxSize: ResizeObserverSize;
|
|
50
50
|
}
|
|
51
|
-
|
|
51
|
+
type ResizeObserverCallback = (entries: ReadonlyArray<ResizeObserverEntry>, observer: ResizeObserver) => void;
|
|
52
52
|
declare const ResizeObserver: {
|
|
53
53
|
prototype: ResizeObserver;
|
|
54
54
|
new (callback: ResizeObserverCallback): ResizeObserver;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "timvir",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.5",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"exports": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"bytestring": "^1",
|
|
19
|
-
"downshift": "^
|
|
19
|
+
"downshift": "^7",
|
|
20
20
|
"fuzzaldrin-plus": "^0.6.0",
|
|
21
21
|
"immer": "^9",
|
|
22
22
|
"prism-react-renderer": "^1",
|
|
@@ -7,5 +7,5 @@ interface Props extends React.ComponentProps<typeof Root> {
|
|
|
7
7
|
value?: string;
|
|
8
8
|
onChange?: (ev: React.ChangeEvent<HTMLInputElement>) => void;
|
|
9
9
|
}
|
|
10
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "hidden" | "color" | "style" | "translate" | "prefix" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "value" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "hidden" | "color" | "style" | "translate" | "prefix" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "value" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
export default _default;
|
|
@@ -8,5 +8,5 @@ interface Props extends React.ComponentProps<typeof Root> {
|
|
|
8
8
|
label: React.ReactNode;
|
|
9
9
|
context?: React.ReactNode;
|
|
10
10
|
}
|
|
11
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "hidden" | "color" | "style" | "icon" | "translate" | "prefix" | "label" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "context" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<Props, "hidden" | "color" | "style" | "icon" | "translate" | "prefix" | "label" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "context" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
export default _default;
|
package/search/index.js
CHANGED
|
@@ -41,19 +41,15 @@ const cx = function cx() {
|
|
|
41
41
|
result.push(atomicClasses[keyHash]);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
|
|
45
44
|
result.push(...nonAtomicClasses);
|
|
46
45
|
return result.join(' ');
|
|
47
46
|
};
|
|
48
|
-
|
|
49
47
|
var cx$1 = cx;
|
|
50
48
|
|
|
51
49
|
/**
|
|
52
50
|
* The underlying DOM element which is rendered by this component.
|
|
53
51
|
*/
|
|
54
|
-
|
|
55
52
|
const Root$2 = "div";
|
|
56
|
-
|
|
57
53
|
function SearchBoxInput(props, ref) {
|
|
58
54
|
const {
|
|
59
55
|
value,
|
|
@@ -76,14 +72,12 @@ function SearchBoxInput(props, ref) {
|
|
|
76
72
|
className: "i1f3edco"
|
|
77
73
|
}));
|
|
78
74
|
}
|
|
79
|
-
|
|
80
75
|
var SearchBoxInput$1 = /*#__PURE__*/React.forwardRef(SearchBoxInput);
|
|
81
76
|
|
|
82
77
|
/**
|
|
83
78
|
* The underlying DOM element which is rendered by this component.
|
|
84
79
|
*/
|
|
85
80
|
const Root$1 = "div";
|
|
86
|
-
|
|
87
81
|
function SearchBoxListItem(props, ref) {
|
|
88
82
|
const {
|
|
89
83
|
icon,
|
|
@@ -104,7 +98,6 @@ function SearchBoxListItem(props, ref) {
|
|
|
104
98
|
className: "du5k8uq"
|
|
105
99
|
}, context)));
|
|
106
100
|
}
|
|
107
|
-
|
|
108
101
|
var SearchBoxListItem$1 = /*#__PURE__*/React.forwardRef(SearchBoxListItem);
|
|
109
102
|
|
|
110
103
|
const Highlight = ({
|
|
@@ -118,18 +111,14 @@ const Highlight = ({
|
|
|
118
111
|
}
|
|
119
112
|
});
|
|
120
113
|
};
|
|
121
|
-
|
|
122
114
|
var Highlight$1 = Highlight;
|
|
123
115
|
|
|
124
116
|
/**
|
|
125
117
|
* The underlying DOM element which is rendered by this component.
|
|
126
118
|
*/
|
|
127
|
-
|
|
128
119
|
const Root = "div";
|
|
129
|
-
|
|
130
120
|
function Dialog(props, ref) {
|
|
131
121
|
var _result$edges;
|
|
132
|
-
|
|
133
122
|
const {
|
|
134
123
|
onClose,
|
|
135
124
|
q,
|
|
@@ -149,12 +138,9 @@ function Dialog(props, ref) {
|
|
|
149
138
|
}, [value, q, setResult]);
|
|
150
139
|
const items = (_result$edges = result === null || result === void 0 ? void 0 : result.edges) !== null && _result$edges !== void 0 ? _result$edges : [];
|
|
151
140
|
const {
|
|
152
|
-
getComboboxProps,
|
|
153
141
|
getMenuProps,
|
|
154
142
|
getInputProps,
|
|
155
|
-
|
|
156
|
-
/* highlightedIndex, */
|
|
157
|
-
getItemProps,
|
|
143
|
+
/* highlightedIndex, */getItemProps,
|
|
158
144
|
closeMenu
|
|
159
145
|
} = useCombobox({
|
|
160
146
|
defaultHighlightedIndex: 0,
|
|
@@ -171,7 +157,6 @@ function Dialog(props, ref) {
|
|
|
171
157
|
if (selectedItem) {
|
|
172
158
|
location.push(selectedItem.node.path);
|
|
173
159
|
}
|
|
174
|
-
|
|
175
160
|
closeMenu();
|
|
176
161
|
}
|
|
177
162
|
});
|
|
@@ -187,15 +172,19 @@ function Dialog(props, ref) {
|
|
|
187
172
|
className: "d1c5pom9",
|
|
188
173
|
onClick: onClose
|
|
189
174
|
}), /*#__PURE__*/React.createElement("div", {
|
|
190
|
-
className: "djje8s3"
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}), /*#__PURE__*/React.createElement("main", {
|
|
175
|
+
className: "djje8s3"
|
|
176
|
+
}, /*#__PURE__*/React.createElement(SearchBoxInput$1, {
|
|
177
|
+
...getInputProps()
|
|
178
|
+
}), /*#__PURE__*/React.createElement("main", {
|
|
179
|
+
...getMenuProps(),
|
|
194
180
|
className: "m1mgb53c"
|
|
195
181
|
}, items.map((item, index) => /*#__PURE__*/React.createElement(Link, {
|
|
196
182
|
key: index,
|
|
197
|
-
href: item.node.path
|
|
198
|
-
|
|
183
|
+
href: item.node.path,
|
|
184
|
+
passHref: true,
|
|
185
|
+
legacyBehavior: true
|
|
186
|
+
}, /*#__PURE__*/React.createElement(SearchBoxListItem$1, {
|
|
187
|
+
...getItemProps({
|
|
199
188
|
item,
|
|
200
189
|
index,
|
|
201
190
|
onClick: onClose
|
|
@@ -231,11 +220,11 @@ function Dialog(props, ref) {
|
|
|
231
220
|
query: value
|
|
232
221
|
}),
|
|
233
222
|
context: item.node.context,
|
|
234
|
-
style: {
|
|
223
|
+
style: {
|
|
224
|
+
// background: highlightedIndex === index ? "rgba(0, 0, 0, 0.05)" : undefined,
|
|
235
225
|
}
|
|
236
226
|
}))))))));
|
|
237
227
|
}
|
|
238
|
-
|
|
239
228
|
var Dialog$1 = /*#__PURE__*/React.forwardRef(Dialog);
|
|
240
229
|
|
|
241
230
|
function Search(props, ref) {
|
|
@@ -243,7 +232,6 @@ function Search(props, ref) {
|
|
|
243
232
|
open,
|
|
244
233
|
...rest
|
|
245
234
|
} = props;
|
|
246
|
-
|
|
247
235
|
if (!open) {
|
|
248
236
|
return null;
|
|
249
237
|
} else {
|
|
@@ -253,13 +241,13 @@ function Search(props, ref) {
|
|
|
253
241
|
});
|
|
254
242
|
}
|
|
255
243
|
}
|
|
256
|
-
|
|
257
244
|
var Search$1 = /*#__PURE__*/React.forwardRef(Search);
|
|
258
245
|
function defaultSearch(toc) {
|
|
259
246
|
return {
|
|
260
247
|
q: async query => {
|
|
261
248
|
const preparedQuery = fuzzaldrin.prepareQuery(query);
|
|
262
|
-
const items = toc.flatMap(n => flatten(n)).map(n => ({
|
|
249
|
+
const items = toc.flatMap(n => flatten(n)).map(n => ({
|
|
250
|
+
...n,
|
|
263
251
|
score: fuzzaldrin.score(n.path, query, {
|
|
264
252
|
preparedQuery
|
|
265
253
|
})
|
|
@@ -277,21 +265,17 @@ function defaultSearch(toc) {
|
|
|
277
265
|
}
|
|
278
266
|
};
|
|
279
267
|
}
|
|
280
|
-
|
|
281
268
|
function flatten(n) {
|
|
282
269
|
let ret = [];
|
|
283
|
-
|
|
284
270
|
if (n.path) {
|
|
285
271
|
ret.push({
|
|
286
272
|
label: n.label,
|
|
287
273
|
path: n.path
|
|
288
274
|
});
|
|
289
275
|
}
|
|
290
|
-
|
|
291
276
|
if (n.children) {
|
|
292
277
|
ret = [...ret, ...n.children.flatMap(flatten)];
|
|
293
278
|
}
|
|
294
|
-
|
|
295
279
|
return ret;
|
|
296
280
|
}
|
|
297
281
|
|
package/search/styles.css
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
.r5ea8qd{position:fixed;top:0px;left:0px;right:0px;bottom:0px;z-index:999;pointer-events:none;overflow:hidden;font-family:system-ui,sans-serif;font-feature-settings:"liga","kern";text-rendering:optimizelegibility;font-size:14px;line-height:1.725;color:var(--timvir-text-color);}
|
|
2
|
-
.dp0smwa{pointer-events:auto;position:relative;z-index:0;}
|
|
3
|
-
.d1a28btb{width:100vw;height:100vh;position:fixed;top:0px;left:0px;display:flex;align-items:flex-start;justify-content:center;pointer-events:auto;}
|
|
4
|
-
.d1c5pom9{position:absolute;top:0px;left:0px;bottom:0px;right:0px;background:rgba(15,15,15,0.6);}
|
|
5
|
-
.djje8s3{position:relative;z-index:1;box-shadow:rgba(15,15,15,0.05) 0px 0px 0px 1px,rgba(15,15,15,0.1) 0px 5px 10px, rgba(15,15,15,0.2) 0px 15px 40px;border-radius:3px;background:white;top:90px;overflow:hidden;width:75%;max-width:600px;min-height:50px;max-height:80vh;}:root[data-timvir-theme="dark"] .djje8s3{background:black;}
|
|
6
|
-
.m1mgb53c{width:100%;height:100%;overflow:hidden auto;}
|
|
7
1
|
.r710k81{display:flex;align-items:center;border:none;padding:0px 16px;width:100%;background:transparent;font-size:18px;line-height:inherit;height:52px;flex-grow:0;flex-shrink:0;z-index:1;box-shadow:rgba(55,53,47,0.09) 0px 1px 0px;}:root[data-timvir-theme="dark"] .r710k81{box-shadow:rgba(255,255,255,0.09) 0px 1px 0px;}
|
|
8
2
|
.s1sjvm51{width:18px;height:18px;display:block;fill:var(--timvir-secondary-text-color);flex-shrink:0;backface-visibility:hidden;margin-right:10px;flex-grow:0;}
|
|
9
3
|
.i1f3edco{font-family:inherit;font-size:inherit;line-height:inherit;border:none;background:none;width:100%;display:block;resize:none;padding:0px;min-width:0px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--timvir-text-color);}.i1f3edco:focus{outline:0;}
|
|
4
|
+
|
|
10
5
|
.r8yc6y{display:flex;padding:8px 0;font-size:14px;color:var(--timvir-text-color);cursor:pointer;box-shadow:rgba(55,53,47,0.09) 0px 1px 0px;}.r8yc6y:hover{background:rgba(0,0,0,0.05);}:root[data-timvir-theme="dark"] .r8yc6y{box-shadow:rgba(255,255,255,0.09) 0px 1px 0px;}:root[data-timvir-theme="dark"] .r8yc6y:hover{background:rgba(255,255,255,0.05);}
|
|
11
6
|
.dqzmx2q{display:flex;align-items:center;justify-content:center;margin-left:14px;width:18px;height:24px;}
|
|
12
7
|
.dp5wq1v{margin-left:14px;}
|
|
13
8
|
.du5k8uq{font-size:12px;color:var(--timvir-secondary-text-color);}
|
|
9
|
+
|
|
10
|
+
.r5ea8qd{position:fixed;top:0px;left:0px;right:0px;bottom:0px;z-index:999;pointer-events:none;overflow:hidden;font-family:system-ui,sans-serif;font-feature-settings:"liga","kern";text-rendering:optimizelegibility;font-size:14px;line-height:1.725;color:var(--timvir-text-color);}
|
|
11
|
+
.dp0smwa{pointer-events:auto;position:relative;z-index:0;}
|
|
12
|
+
.d1a28btb{width:100vw;height:100vh;position:fixed;top:0px;left:0px;display:flex;align-items:flex-start;justify-content:center;pointer-events:auto;}
|
|
13
|
+
.d1c5pom9{position:absolute;top:0px;left:0px;bottom:0px;right:0px;background:rgba(15,15,15,0.6);}
|
|
14
|
+
.djje8s3{position:relative;z-index:1;box-shadow:rgba(15,15,15,0.05) 0px 0px 0px 1px,rgba(15,15,15,0.1) 0px 5px 10px, rgba(15,15,15,0.2) 0px 15px 40px;border-radius:3px;background:white;top:90px;overflow:hidden;width:75%;max-width:600px;min-height:50px;max-height:80vh;}:root[data-timvir-theme="dark"] .djje8s3{background:black;}
|
|
15
|
+
.m1mgb53c{width:100%;height:100%;overflow:hidden auto;}
|
|
16
|
+
|