@lerianstudio/sindarian-ui 1.0.0-beta.25 → 1.0.0-beta.27

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.
@@ -4,7 +4,7 @@ import { Command as CommandPrimitive } from 'cmdk';
4
4
  declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
5
5
  declare const CommandDialog: ({ children, ...props }: DialogProps) => import("react/jsx-runtime").JSX.Element;
6
6
  declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): import("react/jsx-runtime").JSX.Element;
7
- declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): import("react/jsx-runtime").JSX.Element;
7
+ declare function CommandList({ className, children, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): import("react/jsx-runtime").JSX.Element;
8
8
  declare function CommandEmpty(props: React.ComponentProps<typeof CommandPrimitive.Empty>): import("react/jsx-runtime").JSX.Element;
9
9
  declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
10
10
  declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/command/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAA;AAMlD,iBAAS,OAAO,CAAC,EACf,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,2CAW/C;AAED,QAAA,MAAM,aAAa,GAAI,wBAAwB,WAAW,4CAUzD,CAAA;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,2CAiBrD;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAYpD;AAED,iBAAS,YAAY,CACnB,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,2CAS3D;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,2CAWrD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,SAAS,CAAC,2CAQzD;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAWpD;AAED,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,2CAW9B;AAED,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,gBAAgB,EACjB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/command/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAA;AAMlD,iBAAS,O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Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
3
36
  Object.defineProperty(exports, "__esModule", { value: true });
4
37
  exports.CommandDialog = void 0;
5
38
  exports.Command = Command;
@@ -11,6 +44,7 @@ exports.CommandItem = CommandItem;
11
44
  exports.CommandShortcut = CommandShortcut;
12
45
  exports.CommandSeparator = CommandSeparator;
13
46
  const jsx_runtime_1 = require("react/jsx-runtime");
47
+ const React = __importStar(require("react"));
14
48
  const cmdk_1 = require("cmdk");
15
49
  const lucide_react_1 = require("lucide-react");
16
50
  const utils_1 = require("../../../lib/utils");
@@ -25,8 +59,24 @@ exports.CommandDialog = CommandDialog;
25
59
  function CommandInput({ className, ...props }) {
26
60
  return ((0, jsx_runtime_1.jsxs)("div", { "data-slot": "command-input-wrapper", className: "flex items-center border-b px-3", children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), (0, jsx_runtime_1.jsx)(cmdk_1.Command.Input, { "data-slot": "command-input", className: (0, utils_1.cn)('flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-slate-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-slate-400', className), ...props })] }));
27
61
  }
28
- function CommandList({ className, ...props }) {
29
- return ((0, jsx_runtime_1.jsx)(cmdk_1.Command.List, { "data-slot": "command-list", className: (0, utils_1.cn)('max-h-[300px] overflow-x-hidden overflow-y-auto', className), style: { scrollBehavior: 'smooth' }, ...props }));
62
+ function CommandList({ className, children, ...props }) {
63
+ const listRef = React.useRef(null);
64
+ React.useEffect(() => {
65
+ const listElement = listRef.current;
66
+ if (!listElement)
67
+ return;
68
+ const handleWheel = (event) => {
69
+ const { scrollTop, scrollHeight, clientHeight } = listElement;
70
+ const isAtTop = scrollTop === 0 && event.deltaY < 0;
71
+ const isAtBottom = scrollTop + clientHeight >= scrollHeight && event.deltaY > 0;
72
+ if (!isAtTop && !isAtBottom) {
73
+ event.stopPropagation();
74
+ }
75
+ };
76
+ listElement.addEventListener('wheel', handleWheel, { passive: true });
77
+ return () => listElement.removeEventListener('wheel', handleWheel);
78
+ }, []);
79
+ return ((0, jsx_runtime_1.jsx)(cmdk_1.Command.List, { ref: listRef, "data-slot": "command-list", className: (0, utils_1.cn)('max-h-[300px] overflow-x-hidden overflow-y-auto', className), ...props, children: children }));
30
80
  }
31
81
  function CommandEmpty(props) {
32
82
  return ((0, jsx_runtime_1.jsx)(cmdk_1.Command.Empty, { "data-slot": "command-empty", className: "py-6 text-center text-sm", ...props }));
@@ -7,7 +7,7 @@ const sidebar_provider_1 = require("./sidebar-provider");
7
7
  const separator_1 = require("../separator");
8
8
  const SidebarHeader = ({ className, collapsed, ...props }) => ((0, jsx_runtime_1.jsx)("div", { "data-slot": "sidebar-header", "data-collapsed": collapsed, className: (0, utils_1.cn)('dark:bg-cod-gray-950 flex w-full flex-col items-center bg-white p-4', collapsed && 'justify-center p-0', className), ...props }));
9
9
  exports.SidebarHeader = SidebarHeader;
10
- const SidebarContent = ({ className, ...props }) => ((0, jsx_runtime_1.jsx)("div", { "data-slot": "sidebar-content", className: (0, utils_1.cn)('group flex flex-1 flex-col gap-4 overflow-hidden bg-white px-4 pt-4 transition-all duration-300 ease-in-out', 'group-data-[collapsed=true]/sidebar:items-center group-data-[collapsed=true]/sidebar:px-2', className), ...props }));
10
+ const SidebarContent = ({ className, ...props }) => ((0, jsx_runtime_1.jsx)("div", { "data-slot": "sidebar-content", className: (0, utils_1.cn)('group flex flex-1 flex-col gap-4 overflow-hidden overflow-y-auto bg-white px-4 pt-4 transition-all duration-300 ease-in-out', 'group-data-[collapsed=true]/sidebar:items-center group-data-[collapsed=true]/sidebar:px-2', className), ...props }));
11
11
  exports.SidebarContent = SidebarContent;
12
12
  const SidebarGroup = ({ className, ...props }) => ((0, jsx_runtime_1.jsx)("nav", { "data-slot": "sidebar-group", className: (0, utils_1.cn)('flex flex-col gap-1', 'group-data-[collapsed=true]/sidebar:items-center', className), ...props }));
13
13
  exports.SidebarGroup = SidebarGroup;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lerianstudio/sindarian-ui",
3
- "version": "1.0.0-beta.25",
3
+ "version": "1.0.0-beta.27",
4
4
  "description": "Sindarian UI - A UI library for Midaz Console",
5
5
  "license": "ISC",
6
6
  "author": {