@knymbus/voxel-ui 1.0.15 → 1.0.17

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.
@@ -1,4 +1,5 @@
1
1
  import type { StorybookConfig } from '@storybook/react-vite';
2
+ import { mergeConfig } from 'vite';
2
3
 
3
4
  const config: StorybookConfig = {
4
5
  "stories": [
@@ -12,6 +13,14 @@ const config: StorybookConfig = {
12
13
  "@storybook/addon-docs",
13
14
  "@storybook/addon-mcp"
14
15
  ],
15
- "framework": "@storybook/react-vite"
16
+ "framework": "@storybook/react-vite",
17
+ async viteFinal(config) {
18
+ // Dynamically import Tailwind to avoid any execution in the main app
19
+ const { default: tailwindcss } = await import('@tailwindcss/vite');
20
+
21
+ return mergeConfig(config, {
22
+ plugins: [tailwindcss()],
23
+ });
24
+ },
16
25
  };
17
26
  export default config;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="vite/client" />
2
2
  import type { Preview } from '@storybook/react-vite'
3
- import '../src/index.css';
3
+ import './tailwind.css';
4
4
 
5
5
  const preview: Preview = {
6
6
  parameters: {
@@ -0,0 +1,34 @@
1
+ @import "tailwindcss";
2
+
3
+ /* 🎛️ Tailwind v4 Theme Extension Configuration Panel */
4
+ @theme {
5
+ --color-vsc-bg: #ffffff;
6
+ --color-vsc-sidebar: #f3f3f3;
7
+ --color-vsc-border: #e4e4e7;
8
+ --color-vsc-accent: #007acc;
9
+ --color-vsc-accent-hover: #0062a3;
10
+ --color-vsc-hover: #e8e8e8;
11
+ --color-vsc-text: #333333;
12
+
13
+ --color-vsc-button-text: #ffffff;
14
+ --color-vsc-muted: #6a737d;
15
+ --color-vsc-bg-input: #f6f8fa;
16
+ }
17
+
18
+ /* ==========================================================================
19
+ DARK MODE OVERRIDES (Triggers when parent layout has the ".dark" class)
20
+ ========================================================================== */
21
+ @layer base {
22
+ .dark {
23
+ --color-vsc-bg: #1e1e1e;
24
+ --color-vsc-sidebar: #252526;
25
+ --color-vsc-border: #3c3c3c;
26
+ --color-vsc-accent: #007acc;
27
+ --color-vsc-accent-hover: #0062a3;
28
+ --color-vsc-hover: #2a2d2e;
29
+ --color-vsc-text: #cccccc;
30
+
31
+ --color-vsc-muted: #8b949e;
32
+ --color-vsc-bg-input: #1f1f1f;
33
+ }
34
+ }
@@ -241,9 +241,9 @@ function u({ variant: e = "simple", value: u, onChange: d, onClear: f, placehold
241
241
  top: "32px",
242
242
  zIndex: 10,
243
243
  transition: s.transitions.smooth,
244
- height: i || e ? "auto" : "0px",
245
- opacity: i || e ? 1 : 0,
246
- transform: i || e ? "translateY(0px)" : "translateY(-4px)",
244
+ height: e ? "auto" : "0px",
245
+ opacity: +!!e,
246
+ transform: e ? "translateY(4px)" : "translateY(-4px)",
247
247
  pointerEvents: "none"
248
248
  },
249
249
  children: /* @__PURE__ */ (0, c.jsx)("div", {
@@ -252,7 +252,7 @@ function u({ variant: e = "simple", value: u, onChange: d, onClear: f, placehold
252
252
  border: `0px solid ${s.colors.border}`,
253
253
  borderTop: "none",
254
254
  padding: "4px 6px",
255
- borderRadius: "0 0 6px 6px",
255
+ borderRadius: "6px",
256
256
  boxShadow: "0 4px 6px -1px rgba(0,0,0,0.1)"
257
257
  },
258
258
  children: e && b ? b : e && !b && i ? /* @__PURE__ */ (0, c.jsxs)("p", {
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "../../chunks/search-COxH7vvi.js";
1
+ import { n as e, t } from "../../chunks/search-WFmasN49.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-COxH7vvi.js";
6
+ import { n as P, t as F } from "./chunks/search-WFmasN49.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knymbus/voxel-ui",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,4 +1,4 @@
1
- import React, { useState } from 'react';
1
+ import { useState } from 'react';
2
2
  import type { Meta, StoryObj } from '@storybook/react';
3
3
  import SearchInput from './SearchInput';
4
4
  import { SearchResultItem } from './types';
@@ -45,10 +45,10 @@ const MultiSearchWorkspace = () => {
45
45
  }
46
46
 
47
47
  return (
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' }}>
48
+ <div className="p-8 bg-vsc-sidebar border border-vsc-border rounded-md space-y-8 min-w-112.5 text-vsc-text" >
49
49
 
50
50
  {/* 1. Simple Variant Bracket */}
51
- <div className="space-y-1.5" style={{ height: 'auto', width: '350px',}}>
51
+ <div className="space-y-1.5" >
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
- // peekContent={<ResultPanel />}
59
+ peekContent={<ResultPanel />}
60
60
  />
61
61
  </div>
62
62
 
@@ -159,13 +159,13 @@ export default function SearchInput({
159
159
  zIndex: 10,
160
160
  // overflow: 'hidden',
161
161
  transition: searchTokens.transitions.smooth,
162
- height: hasResults || hasQuery ? 'auto' : '0px',
163
- opacity: hasResults || hasQuery ? 1 : 0,
164
- transform: hasResults || hasQuery ? 'translateY(0px)' : 'translateY(-4px)',
162
+ height: hasQuery ? 'auto' : '0px',
163
+ opacity: hasQuery ? 1 : 0,
164
+ transform: hasQuery ? 'translateY(4px)' : 'translateY(-4px)',
165
165
  pointerEvents: 'none'
166
166
  }}
167
167
  >
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)' }}>
168
+ <div style={{ backgroundColor: searchTokens.colors.sidebarBg, border: `0px solid ${searchTokens.colors.border}`, borderTop: 'none', padding: '4px 6px', borderRadius: '6px', boxShadow: '0 4px 6px -1px rgba(0,0,0,0.1)' }}>
169
169
  {renderedPeek()}
170
170
  </div>
171
171
  </div>
package/src/index.css CHANGED
@@ -36,4 +36,12 @@
36
36
  --color-vsc-muted: #8b949e;
37
37
  --color-vsc-bg-input: #1f1f1f;
38
38
  }
39
+ }
40
+
41
+ .p-8{
42
+ padding:32px;
43
+ }
44
+
45
+ .voxel:bg-amber-500{
46
+ background-color:var(--color-vsc-accent);
39
47
  }
package/src/index.ts CHANGED
@@ -1,4 +1,3 @@
1
- import './index.css';
2
1
  export * from './components/resizable';
3
2
  export * from './components/tabs';
4
3
  export * from './components/button';
package/vite.config.mts CHANGED
@@ -8,12 +8,11 @@ import { fileURLToPath } from 'node:url';
8
8
  import { storybookTest } from '@storybook/addon-vitest/vitest-plugin';
9
9
  import { playwright } from '@vitest/browser-playwright';
10
10
  const dirname = typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url));
11
- import tailwindcss from '@tailwindcss/vite';
11
+
12
12
 
13
13
  // More info at: https://storybook.js.org/docs/next/writing-tests/integrations/vitest-addon
14
14
  export default defineConfig({
15
15
  plugins: [
16
- tailwindcss(),
17
16
  react(),
18
17
  // Auto-generates independent TypeScript type declaration files (.d.ts) matching paths
19
18
  dts({
@@ -1,3 +0,0 @@
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*/