@knymbus/voxel-ui 1.0.14 → 1.0.15
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/voxel-ui.css +3 -0
- package/dist/chunks/{search-CIhA-ti4.js → search-COxH7vvi.js} +44 -28
- package/dist/components/search/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/search/SearchInput.stories.tsx +4 -4
- package/src/components/search/SearchInput.tsx +33 -12
- package/src/index.ts +1 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer theme{:root,:host{--voxel-font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--voxel-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--voxel-default-font-family:var(--voxel-font-sans);--voxel-default-mono-font-family:var(--voxel-font-mono)}}@layer base{@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--voxel-default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--voxel-default-font-feature-settings,normal);font-variation-settings:var(--voxel-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--voxel-default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--voxel-default-mono-font-feature-settings,normal);font-variation-settings:var(--voxel-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.dark{--color-vsc-bg:#1e1e1e;--color-vsc-sidebar:#252526;--color-vsc-border:#3c3c3c;--color-vsc-accent:#007acc;--color-vsc-accent-hover:#0062a3;--color-vsc-hover:#2a2d2e;--color-vsc-text:#ccc;--color-vsc-muted:#8b949e;--color-vsc-bg-input:#1f1f1f}}@layer components,utilities;
|
|
3
|
+
/*$vite$:1*/
|
|
@@ -186,28 +186,7 @@ function u({ variant: e = "simple", value: u, onChange: d, onClear: f, placehold
|
|
|
186
186
|
boxSizing: "border-box"
|
|
187
187
|
};
|
|
188
188
|
if (e === "simple") {
|
|
189
|
-
let e =
|
|
190
|
-
style: {
|
|
191
|
-
margin: 0,
|
|
192
|
-
fontSize: "10px",
|
|
193
|
-
fontFamily: s.typography.mono,
|
|
194
|
-
color: s.colors.muted,
|
|
195
|
-
whiteSpace: "nowrap",
|
|
196
|
-
overflow: "hidden",
|
|
197
|
-
textOverflow: "ellipsis"
|
|
198
|
-
},
|
|
199
|
-
children: [
|
|
200
|
-
"Showing ",
|
|
201
|
-
/* @__PURE__ */ (0, c.jsx)("span", {
|
|
202
|
-
style: {
|
|
203
|
-
color: s.colors.borderAccent,
|
|
204
|
-
fontWeight: "bold"
|
|
205
|
-
},
|
|
206
|
-
children: m
|
|
207
|
-
}),
|
|
208
|
-
" matching database metrics records"
|
|
209
|
-
]
|
|
210
|
-
});
|
|
189
|
+
let e = u.length > 0, i = m > 0;
|
|
211
190
|
return /* @__PURE__ */ (0, c.jsxs)("div", {
|
|
212
191
|
style: N,
|
|
213
192
|
className: v,
|
|
@@ -261,23 +240,60 @@ function u({ variant: e = "simple", value: u, onChange: d, onClear: f, placehold
|
|
|
261
240
|
right: 0,
|
|
262
241
|
top: "32px",
|
|
263
242
|
zIndex: 10,
|
|
264
|
-
overflow: "hidden",
|
|
265
243
|
transition: s.transitions.smooth,
|
|
266
|
-
height: e ? "
|
|
267
|
-
opacity:
|
|
268
|
-
transform: e ? "translateY(0px)" : "translateY(-4px)",
|
|
244
|
+
height: i || e ? "auto" : "0px",
|
|
245
|
+
opacity: i || e ? 1 : 0,
|
|
246
|
+
transform: i || e ? "translateY(0px)" : "translateY(-4px)",
|
|
269
247
|
pointerEvents: "none"
|
|
270
248
|
},
|
|
271
249
|
children: /* @__PURE__ */ (0, c.jsx)("div", {
|
|
272
250
|
style: {
|
|
273
251
|
backgroundColor: s.colors.sidebarBg,
|
|
274
|
-
border: `
|
|
252
|
+
border: `0px solid ${s.colors.border}`,
|
|
275
253
|
borderTop: "none",
|
|
276
254
|
padding: "4px 6px",
|
|
277
255
|
borderRadius: "0 0 6px 6px",
|
|
278
256
|
boxShadow: "0 4px 6px -1px rgba(0,0,0,0.1)"
|
|
279
257
|
},
|
|
280
|
-
children: i
|
|
258
|
+
children: e && b ? b : e && !b && i ? /* @__PURE__ */ (0, c.jsxs)("p", {
|
|
259
|
+
style: {
|
|
260
|
+
margin: 0,
|
|
261
|
+
fontSize: "10px",
|
|
262
|
+
fontFamily: s.typography.mono,
|
|
263
|
+
color: s.colors.muted,
|
|
264
|
+
whiteSpace: "nowrap",
|
|
265
|
+
overflow: "hidden",
|
|
266
|
+
textOverflow: "ellipsis"
|
|
267
|
+
},
|
|
268
|
+
children: [
|
|
269
|
+
"Showing ",
|
|
270
|
+
/* @__PURE__ */ (0, c.jsx)("span", {
|
|
271
|
+
style: {
|
|
272
|
+
color: s.colors.borderAccent,
|
|
273
|
+
fontWeight: "bold"
|
|
274
|
+
},
|
|
275
|
+
children: m
|
|
276
|
+
}),
|
|
277
|
+
" matching database metrics records"
|
|
278
|
+
]
|
|
279
|
+
}) : e && !b && !i ? /* @__PURE__ */ (0, c.jsxs)("p", {
|
|
280
|
+
style: {
|
|
281
|
+
margin: 0,
|
|
282
|
+
fontSize: "10px",
|
|
283
|
+
fontFamily: s.typography.mono,
|
|
284
|
+
color: s.colors.borderAccent,
|
|
285
|
+
whiteSpace: "nowrap",
|
|
286
|
+
overflow: "hidden",
|
|
287
|
+
textOverflow: "ellipsis"
|
|
288
|
+
},
|
|
289
|
+
children: ["No matching records found for your query: ", /* @__PURE__ */ (0, c.jsx)("span", {
|
|
290
|
+
style: {
|
|
291
|
+
color: s.colors.text,
|
|
292
|
+
fontWeight: "bold"
|
|
293
|
+
},
|
|
294
|
+
children: u
|
|
295
|
+
})]
|
|
296
|
+
}) : null
|
|
281
297
|
})
|
|
282
298
|
})]
|
|
283
299
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "../../chunks/search-
|
|
1
|
+
import { n as e, t } from "../../chunks/search-COxH7vvi.js";
|
|
2
2
|
export { t as SearchInput, e as searchTokens };
|
package/dist/index.js
CHANGED
|
@@ -3,5 +3,5 @@ import { i as t, n, r, t as i } from "./chunks/tabs-MaVN00hJ.js";
|
|
|
3
3
|
import { t as a } from "./chunks/Button-BgQwvn3C.js";
|
|
4
4
|
import { n as o, t as s } from "./chunks/button-dHcpTNIG.js";
|
|
5
5
|
import { C as c, E as l, S as u, T as d, _ as f, a as p, b as m, c as h, d as g, f as _, g as v, h as y, i as b, l as x, m as S, n as C, o as w, p as T, r as E, s as D, t as O, u as k, v as A, w as j, x as M, y as N } from "./chunks/icons-BpfDVwCQ.js";
|
|
6
|
-
import { n as P, t as F } from "./chunks/search-
|
|
6
|
+
import { n as P, t as F } from "./chunks/search-COxH7vvi.js";
|
|
7
7
|
export { A as Add, S as BlankDoc, a as Button, o as ButtonGroup, _ as Chat, N as ChevronDown, l as Close, x as Comment, k as DeleteChat, j as Document, v as Expand, c as Folder, C as Group, y as Minimize, f as Minus, w as More, D as OpenFolder, b as Person, g as PlusChat, h as PlusComment, T as PlusDoc, O as PlusDocBadge, E as PlusPerson, M as Refresh, e as ResizablePanel, u as Search, F as SearchInput, s as SplitActionButton, i as TabButton, n as TabPanel, r as TabPanelList, d as Terminal, m as Trash, p as Truck, P as searchTokens, t as useTab };
|
package/package.json
CHANGED
|
@@ -45,10 +45,10 @@ const MultiSearchWorkspace = () => {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
return (
|
|
48
|
-
<div
|
|
48
|
+
<div style={{ fontFamily: 'var(--font-sans)', minWidth: '450px', backgroundColor: 'var(--color-vsc-sidebar)', border: '1px solid var(--color-vsc-border)', borderRadius: '6px', padding: '32px' }}>
|
|
49
49
|
|
|
50
50
|
{/* 1. Simple Variant Bracket */}
|
|
51
|
-
<div className="space-y-1.5">
|
|
51
|
+
<div className="space-y-1.5" style={{ height: 'auto', width: '350px',}}>
|
|
52
52
|
<p className="text-[10px] font-bold text-vsc-muted uppercase tracking-wider">1. Simple Matrix Variant with Count Log</p>
|
|
53
53
|
<SearchInput
|
|
54
54
|
variant="simple"
|
|
@@ -56,7 +56,7 @@ const MultiSearchWorkspace = () => {
|
|
|
56
56
|
onChange={setSimpleQuery}
|
|
57
57
|
resultsCount={filteredSimpleResults.length}
|
|
58
58
|
placeholder="Type track ID to evaluate records count..."
|
|
59
|
-
|
|
59
|
+
// peekContent={<ResultPanel />}
|
|
60
60
|
/>
|
|
61
61
|
</div>
|
|
62
62
|
|
|
@@ -69,7 +69,7 @@ const MultiSearchWorkspace = () => {
|
|
|
69
69
|
onChange={setSimpleFloatQuery}
|
|
70
70
|
placeholder="Expandable terminal search..."
|
|
71
71
|
showFloatPeek
|
|
72
|
-
|
|
72
|
+
peekContent={<ResultPanel />}
|
|
73
73
|
/>
|
|
74
74
|
</div>
|
|
75
75
|
|
|
@@ -93,14 +93,35 @@ export default function SearchInput({
|
|
|
93
93
|
|
|
94
94
|
// --- 1. SIMPLE VARIANT ---
|
|
95
95
|
if (variant === 'simple') {
|
|
96
|
-
const
|
|
96
|
+
const hasQuery = value.length > 0;
|
|
97
|
+
const hasResults = resultsCount > 0;
|
|
97
98
|
|
|
98
99
|
// ⚡ Fallback logic: check if the dev supplied a custom peek content block component
|
|
99
|
-
const renderedPeek =
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
const renderedPeek = () => {
|
|
101
|
+
|
|
102
|
+
if (hasQuery && peekContent) {
|
|
103
|
+
return peekContent;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (hasQuery && !peekContent && hasResults) {
|
|
107
|
+
return (
|
|
108
|
+
<p style={{ margin: 0, fontSize: '10px', fontFamily: searchTokens.typography.mono, color: searchTokens.colors.muted, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>
|
|
109
|
+
Showing <span style={{ color: searchTokens.colors.borderAccent, fontWeight: 'bold' }}>{resultsCount}</span> matching database metrics records
|
|
110
|
+
</p>
|
|
111
|
+
)
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (hasQuery && !peekContent && !hasResults) {
|
|
115
|
+
return (
|
|
116
|
+
<p style={{ margin: 0, fontSize: '10px', fontFamily: searchTokens.typography.mono, color: searchTokens.colors.borderAccent, whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>
|
|
117
|
+
No matching records found for your query: <span style={{ color: searchTokens.colors.text, fontWeight: 'bold' }}>{value}</span>
|
|
118
|
+
</p>
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return null;
|
|
123
|
+
|
|
124
|
+
}
|
|
104
125
|
|
|
105
126
|
return (
|
|
106
127
|
<div style={baseWrapperStyles} className={className}>
|
|
@@ -136,16 +157,16 @@ export default function SearchInput({
|
|
|
136
157
|
right: 0,
|
|
137
158
|
top: '32px',
|
|
138
159
|
zIndex: 10,
|
|
139
|
-
overflow: 'hidden',
|
|
160
|
+
// overflow: 'hidden',
|
|
140
161
|
transition: searchTokens.transitions.smooth,
|
|
141
|
-
height: hasResults ? '
|
|
142
|
-
opacity: hasResults ? 1 : 0,
|
|
143
|
-
transform: hasResults ? 'translateY(0px)' : 'translateY(-4px)',
|
|
162
|
+
height: hasResults || hasQuery ? 'auto' : '0px',
|
|
163
|
+
opacity: hasResults || hasQuery ? 1 : 0,
|
|
164
|
+
transform: hasResults || hasQuery ? 'translateY(0px)' : 'translateY(-4px)',
|
|
144
165
|
pointerEvents: 'none'
|
|
145
166
|
}}
|
|
146
167
|
>
|
|
147
|
-
<div style={{ backgroundColor: searchTokens.colors.sidebarBg, border: `
|
|
148
|
-
{renderedPeek}
|
|
168
|
+
<div style={{ backgroundColor: searchTokens.colors.sidebarBg, border: `0px solid ${searchTokens.colors.border}`, borderTop: 'none', padding: '4px 6px', borderRadius: '0 0 6px 6px', boxShadow: '0 4px 6px -1px rgba(0,0,0,0.1)' }}>
|
|
169
|
+
{renderedPeek()}
|
|
149
170
|
</div>
|
|
150
171
|
</div>
|
|
151
172
|
</div>
|
package/src/index.ts
CHANGED