@sikka/hawa 0.36.2-next → 0.37.0-next

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.
Files changed (66) hide show
  1. package/dist/appLayout/index.js +1 -1
  2. package/dist/appLayout/index.js.map +1 -1
  3. package/dist/appLayout/index.mjs +1 -1
  4. package/dist/appLayout/index.mjs.map +1 -1
  5. package/dist/blocks/auth/index.js +11 -14
  6. package/dist/blocks/auth/index.mjs +1 -1
  7. package/dist/blocks/feedback/index.js +11 -14
  8. package/dist/blocks/feedback/index.mjs +1 -1
  9. package/dist/blocks/index.js +295 -181
  10. package/dist/blocks/index.mjs +2 -2
  11. package/dist/blocks/misc/index.js +257 -143
  12. package/dist/blocks/misc/index.mjs +50 -16
  13. package/dist/blocks/pricing/index.js +94 -11
  14. package/dist/blocks/pricing/index.mjs +1 -1
  15. package/dist/{chunk-CJ57JBYA.mjs → chunk-I5YX7N76.mjs} +94 -11
  16. package/dist/{chunk-T33FXOHA.mjs → chunk-PO5OW6SQ.mjs} +151 -40
  17. package/dist/{chunk-HLYAX77R.mjs → chunk-SE5A4R76.mjs} +11 -14
  18. package/dist/{chunk-OPYDG34F.mjs → chunk-ZBUBNKF6.mjs} +93 -1
  19. package/dist/combobox/index.d.mts +1 -4
  20. package/dist/combobox/index.d.ts +1 -4
  21. package/dist/combobox/index.js +2 -1
  22. package/dist/combobox/index.js.map +1 -1
  23. package/dist/combobox/index.mjs +2 -1
  24. package/dist/combobox/index.mjs.map +1 -1
  25. package/dist/command/index.d.mts +4 -36
  26. package/dist/command/index.d.ts +4 -36
  27. package/dist/command/index.js +43 -5
  28. package/dist/command/index.js.map +1 -1
  29. package/dist/command/index.mjs +39 -3
  30. package/dist/command/index.mjs.map +1 -1
  31. package/dist/elements/index.d.mts +28 -2
  32. package/dist/elements/index.d.ts +28 -2
  33. package/dist/elements/index.js +437 -284
  34. package/dist/elements/index.mjs +41 -4
  35. package/dist/hooks/index.d.mts +25 -1
  36. package/dist/hooks/index.d.ts +25 -1
  37. package/dist/hooks/index.js +96 -0
  38. package/dist/hooks/index.mjs +9 -1
  39. package/dist/index-CoPyqTu8.d.mts +63 -0
  40. package/dist/index-CoPyqTu8.d.ts +63 -0
  41. package/dist/index.css +20 -3
  42. package/dist/index.d.mts +52 -2
  43. package/dist/index.d.ts +52 -2
  44. package/dist/index.js +953 -707
  45. package/dist/index.mjs +481 -241
  46. package/dist/layout/index.js +1 -1
  47. package/dist/layout/index.mjs +1 -1
  48. package/dist/phoneInput/index.js +11 -14
  49. package/dist/phoneInput/index.js.map +1 -1
  50. package/dist/phoneInput/index.mjs +11 -14
  51. package/dist/phoneInput/index.mjs.map +1 -1
  52. package/dist/scrollArea/index.js +94 -11
  53. package/dist/scrollArea/index.js.map +1 -1
  54. package/dist/scrollArea/index.mjs +94 -11
  55. package/dist/scrollArea/index.mjs.map +1 -1
  56. package/dist/select/index.js +11 -14
  57. package/dist/select/index.js.map +1 -1
  58. package/dist/select/index.mjs +11 -14
  59. package/dist/select/index.mjs.map +1 -1
  60. package/dist/tabs/index.d.mts +3 -1
  61. package/dist/tabs/index.d.ts +3 -1
  62. package/dist/tabs/index.js +189 -32
  63. package/dist/tabs/index.js.map +1 -1
  64. package/dist/tabs/index.mjs +184 -27
  65. package/dist/tabs/index.mjs.map +1 -1
  66. package/package.json +1 -1
@@ -22,10 +22,10 @@ import {
22
22
  TabsList,
23
23
  TabsTrigger,
24
24
  Textarea
25
- } from "../chunk-T33FXOHA.mjs";
25
+ } from "../chunk-PO5OW6SQ.mjs";
26
26
  import {
27
27
  useClipboard
28
- } from "../chunk-OPYDG34F.mjs";
28
+ } from "../chunk-ZBUBNKF6.mjs";
29
29
  import {
30
30
  Sheet,
31
31
  SheetClose,
@@ -1386,6 +1386,7 @@ import * as PopoverPrimitive from "@radix-ui/react-popover";
1386
1386
 
1387
1387
  // elements/command/Command.tsx
1388
1388
  import * as React12 from "react";
1389
+ import { Dialog as Dialog2 } from "@radix-ui/react-dialog";
1389
1390
  import { Command as CommandPrimitive } from "cmdk";
1390
1391
  var Command = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
1391
1392
  CommandPrimitive,
@@ -1399,7 +1400,7 @@ var Command = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__
1399
1400
  }
1400
1401
  ));
1401
1402
  var CommandDialog = ({ children, ...props }) => {
1402
- return /* @__PURE__ */ React12.createElement(Dialog, { ...props }, /* @__PURE__ */ React12.createElement(DialogContent, { className: "hawa-overflow-hidden hawa-p-0 hawa-shadow-lg" }, /* @__PURE__ */ React12.createElement(Command, { className: "[&_[cmdk-group-heading]]:hawa-px-2 [&_[cmdk-group-heading]]:hawa-font-medium [&_[cmdk-group-heading]]:hawa-text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:hawa-pt-0 [&_[cmdk-group]]:hawa-px-2 [&_[cmdk-input-wrapper]_svg]:hawa-h-5 [&_[cmdk-input-wrapper]_svg]:hawa-w-5 [&_[cmdk-input]]:hawa-h-12 [&_[cmdk-item]]:hawa-px-2 [&_[cmdk-item]]:hawa-py-3 [&_[cmdk-item]_svg]:hawa-h-5 [&_[cmdk-item]_svg]:hawa-w-5" }, children)));
1403
+ return /* @__PURE__ */ React12.createElement(Dialog2, { ...props }, /* @__PURE__ */ React12.createElement(DialogContent, { className: "hawa-overflow-hidden hawa-p-0 hawa-shadow-lg" }, /* @__PURE__ */ React12.createElement(Command, { className: "[&_[cmdk-group-heading]]:hawa-px-2 [&_[cmdk-group-heading]]:hawa-font-medium [&_[cmdk-group-heading]]:hawa-text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:hawa-pt-0 [&_[cmdk-group]]:hawa-px-2 [&_[cmdk-input-wrapper]_svg]:hawa-h-5 [&_[cmdk-input-wrapper]_svg]:hawa-w-5 [&_[cmdk-input]]:hawa-h-12 [&_[cmdk-item]]:hawa-px-2 [&_[cmdk-item]]:hawa-py-3 [&_[cmdk-item]_svg]:hawa-h-5 [&_[cmdk-item]_svg]:hawa-w-5" }, children)));
1403
1404
  };
1404
1405
  var CommandInput = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React12.createElement(
1405
1406
  "div",
@@ -1494,13 +1495,47 @@ var CommandShortcut = ({
1494
1495
  "span",
1495
1496
  {
1496
1497
  className: cn(
1497
- "hawa-ml-auto hawa-text-xs hawa-tracking-widest hawa-text-muted-foreground",
1498
+ "hawa-ms-auto hawa-text-xs hawa-tracking-widest hawa-text-muted-foreground",
1498
1499
  className
1499
1500
  ),
1500
1501
  ...props
1501
1502
  }
1502
1503
  );
1503
1504
  };
1505
+ var FullCommand = ({ items, direction = "ltr", texts }) => {
1506
+ return /* @__PURE__ */ React12.createElement(
1507
+ Command,
1508
+ {
1509
+ dir: direction,
1510
+ className: "hawa-rounded-lg hawa-border hawa-shadow-md !hawa-h-full"
1511
+ },
1512
+ /* @__PURE__ */ React12.createElement(
1513
+ CommandInput,
1514
+ {
1515
+ placeholder: (texts == null ? void 0 : texts.searchPlaceholder) || "Type a command or search..."
1516
+ }
1517
+ ),
1518
+ /* @__PURE__ */ React12.createElement(CommandList, null, /* @__PURE__ */ React12.createElement(CommandEmpty, null, (texts == null ? void 0 : texts.emptyText) || "No results found."), items.map((item, index) => {
1519
+ var _a;
1520
+ if (item.type === "group") {
1521
+ return /* @__PURE__ */ React12.createElement(CommandGroup, { heading: item.heading, key: index }, (_a = item.items) == null ? void 0 : _a.map((subItem, subIndex) => /* @__PURE__ */ React12.createElement(CommandItem, { key: subIndex, onSelect: subItem.action }, /* @__PURE__ */ React12.createElement(subItem.icon, { className: "hawa-icon hawa-me-2" }), /* @__PURE__ */ React12.createElement("span", null, subItem.text), subItem.shortcut && /* @__PURE__ */ React12.createElement(CommandShortcut, null, subItem.shortcut))));
1522
+ } else if (item.type === "separator") {
1523
+ return /* @__PURE__ */ React12.createElement(CommandSeparator, { key: index });
1524
+ }
1525
+ return null;
1526
+ }))
1527
+ );
1528
+ };
1529
+ var AppCommand = ({ commandProps, dialogProps }) => {
1530
+ return /* @__PURE__ */ React12.createElement(Dialog2, { ...dialogProps }, /* @__PURE__ */ React12.createElement(
1531
+ DialogContent,
1532
+ {
1533
+ hideCloseButton: true,
1534
+ className: "hawa-overflow-hidden !hawa-p-0 hawa-shadow-lg !hawa-min-h-[50%]"
1535
+ },
1536
+ /* @__PURE__ */ React12.createElement(FullCommand, { ...commandProps })
1537
+ ));
1538
+ };
1504
1539
  CommandShortcut.displayName = "CommandShortcut";
1505
1540
  CommandItem.displayName = CommandPrimitive.Item.displayName;
1506
1541
  CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
@@ -3402,6 +3437,7 @@ export {
3402
3437
  AccordionRoot,
3403
3438
  AccordionTrigger,
3404
3439
  Alert,
3440
+ AppCommand,
3405
3441
  AppStores,
3406
3442
  Avatar,
3407
3443
  BackToTop,
@@ -3465,6 +3501,7 @@ export {
3465
3501
  DropdownMenuTrigger,
3466
3502
  FileDropzone,
3467
3503
  FileUploader,
3504
+ FullCommand,
3468
3505
  Input,
3469
3506
  InterfaceSettings,
3470
3507
  Label,
@@ -109,4 +109,28 @@ declare const useMeasureDirty: (ref: RefObject<HTMLElement>) => ContentRect;
109
109
 
110
110
  declare function useClickOutside<T extends HTMLElement = any>(handler: () => void, events?: string[] | null, nodes?: (HTMLElement | null)[]): React$1.MutableRefObject<T | undefined>;
111
111
 
112
- export { type ContentRect, type UseFocusWithinOptions, type UseMediaQueryOptions, reducer, toast, useBreakpoint, useClickOutside, useClipboard, useDialogCarousel, useFocusWithin, useIsomorphicEffect, useMeasureDirty, useMediaQuery, useMultiStepDialog, useTabs, useToast, useWindowSize };
112
+ type KeyboardModifiers = {
113
+ alt: boolean;
114
+ ctrl: boolean;
115
+ meta: boolean;
116
+ mod: boolean;
117
+ shift: boolean;
118
+ };
119
+ type Hotkey = KeyboardModifiers & {
120
+ key?: string;
121
+ };
122
+ type CheckHotkeyMatch = (event: KeyboardEvent) => boolean;
123
+ declare function parseHotkey(hotkey: string): Hotkey;
124
+ declare function getHotkeyMatcher(hotkey: string): CheckHotkeyMatch;
125
+ interface HotkeyItemOptions {
126
+ preventDefault?: boolean;
127
+ }
128
+ declare function getHotkeyHandler(hotkeys: HotkeyItem[]): (event: React.KeyboardEvent<HTMLElement> | KeyboardEvent) => void;
129
+ type HotkeyItem = [
130
+ string,
131
+ (event: KeyboardEvent) => void,
132
+ HotkeyItemOptions?
133
+ ];
134
+ declare function useShortcuts(hotkeys: HotkeyItem[], tagsToIgnore?: string[], triggerOnContentEditable?: boolean): void;
135
+
136
+ export { type ContentRect, type Hotkey, type HotkeyItem, type HotkeyItemOptions, type KeyboardModifiers, type UseFocusWithinOptions, type UseMediaQueryOptions, getHotkeyHandler, getHotkeyMatcher, parseHotkey, reducer, toast, useBreakpoint, useClickOutside, useClipboard, useDialogCarousel, useFocusWithin, useIsomorphicEffect, useMeasureDirty, useMediaQuery, useMultiStepDialog, useShortcuts, useTabs, useToast, useWindowSize };
@@ -109,4 +109,28 @@ declare const useMeasureDirty: (ref: RefObject<HTMLElement>) => ContentRect;
109
109
 
110
110
  declare function useClickOutside<T extends HTMLElement = any>(handler: () => void, events?: string[] | null, nodes?: (HTMLElement | null)[]): React$1.MutableRefObject<T | undefined>;
111
111
 
112
- export { type ContentRect, type UseFocusWithinOptions, type UseMediaQueryOptions, reducer, toast, useBreakpoint, useClickOutside, useClipboard, useDialogCarousel, useFocusWithin, useIsomorphicEffect, useMeasureDirty, useMediaQuery, useMultiStepDialog, useTabs, useToast, useWindowSize };
112
+ type KeyboardModifiers = {
113
+ alt: boolean;
114
+ ctrl: boolean;
115
+ meta: boolean;
116
+ mod: boolean;
117
+ shift: boolean;
118
+ };
119
+ type Hotkey = KeyboardModifiers & {
120
+ key?: string;
121
+ };
122
+ type CheckHotkeyMatch = (event: KeyboardEvent) => boolean;
123
+ declare function parseHotkey(hotkey: string): Hotkey;
124
+ declare function getHotkeyMatcher(hotkey: string): CheckHotkeyMatch;
125
+ interface HotkeyItemOptions {
126
+ preventDefault?: boolean;
127
+ }
128
+ declare function getHotkeyHandler(hotkeys: HotkeyItem[]): (event: React.KeyboardEvent<HTMLElement> | KeyboardEvent) => void;
129
+ type HotkeyItem = [
130
+ string,
131
+ (event: KeyboardEvent) => void,
132
+ HotkeyItemOptions?
133
+ ];
134
+ declare function useShortcuts(hotkeys: HotkeyItem[], tagsToIgnore?: string[], triggerOnContentEditable?: boolean): void;
135
+
136
+ export { type ContentRect, type Hotkey, type HotkeyItem, type HotkeyItemOptions, type KeyboardModifiers, type UseFocusWithinOptions, type UseMediaQueryOptions, getHotkeyHandler, getHotkeyMatcher, parseHotkey, reducer, toast, useBreakpoint, useClickOutside, useClipboard, useDialogCarousel, useFocusWithin, useIsomorphicEffect, useMeasureDirty, useMediaQuery, useMultiStepDialog, useShortcuts, useTabs, useToast, useWindowSize };
@@ -31,6 +31,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  // hooks/index.ts
32
32
  var hooks_exports = {};
33
33
  __export(hooks_exports, {
34
+ getHotkeyHandler: () => getHotkeyHandler,
35
+ getHotkeyMatcher: () => getHotkeyMatcher,
36
+ parseHotkey: () => parseHotkey,
34
37
  reducer: () => reducer,
35
38
  toast: () => toast,
36
39
  useBreakpoint: () => useBreakpoint,
@@ -42,6 +45,7 @@ __export(hooks_exports, {
42
45
  useMeasureDirty: () => useMeasureDirty,
43
46
  useMediaQuery: () => useMediaQuery,
44
47
  useMultiStepDialog: () => useMultiStepDialog,
48
+ useShortcuts: () => useShortcuts,
45
49
  useTabs: () => useTabs,
46
50
  useToast: () => useToast,
47
51
  useWindowSize: () => useWindowSize
@@ -491,8 +495,99 @@ function useClickOutside(handler, events, nodes) {
491
495
  }, [ref, handler, nodes]);
492
496
  return ref;
493
497
  }
498
+
499
+ // hooks/useShortcuts.ts
500
+ var import_react17 = require("react");
501
+ function parseHotkey(hotkey) {
502
+ const keys = hotkey.toLowerCase().split("+").map((part) => part.trim());
503
+ const modifiers = {
504
+ alt: keys.includes("alt"),
505
+ ctrl: keys.includes("ctrl"),
506
+ meta: keys.includes("meta"),
507
+ mod: keys.includes("mod"),
508
+ shift: keys.includes("shift")
509
+ };
510
+ const reservedKeys = ["alt", "ctrl", "meta", "shift", "mod"];
511
+ const freeKey = keys.find((key) => !reservedKeys.includes(key));
512
+ return {
513
+ ...modifiers,
514
+ key: freeKey
515
+ };
516
+ }
517
+ function isExactHotkey(hotkey, event) {
518
+ const { alt, ctrl, meta, mod, shift, key } = hotkey;
519
+ const { altKey, ctrlKey, metaKey, shiftKey, key: pressedKey } = event;
520
+ if (alt !== altKey) {
521
+ return false;
522
+ }
523
+ if (mod) {
524
+ if (!ctrlKey && !metaKey) {
525
+ return false;
526
+ }
527
+ } else {
528
+ if (ctrl !== ctrlKey) {
529
+ return false;
530
+ }
531
+ if (meta !== metaKey) {
532
+ return false;
533
+ }
534
+ }
535
+ if (shift !== shiftKey) {
536
+ return false;
537
+ }
538
+ if (key && (pressedKey.toLowerCase() === key.toLowerCase() || event.code.replace("Key", "").toLowerCase() === key.toLowerCase())) {
539
+ return true;
540
+ }
541
+ return false;
542
+ }
543
+ function getHotkeyMatcher(hotkey) {
544
+ return (event) => isExactHotkey(parseHotkey(hotkey), event);
545
+ }
546
+ function getHotkeyHandler(hotkeys) {
547
+ return (event) => {
548
+ const _event = "nativeEvent" in event ? event.nativeEvent : event;
549
+ hotkeys.forEach(([hotkey, handler, options = { preventDefault: true }]) => {
550
+ if (getHotkeyMatcher(hotkey)(_event)) {
551
+ if (options.preventDefault) {
552
+ event.preventDefault();
553
+ }
554
+ handler(_event);
555
+ }
556
+ });
557
+ };
558
+ }
559
+ function shouldFireEvent(event, tagsToIgnore, triggerOnContentEditable = false) {
560
+ if (event.target instanceof HTMLElement) {
561
+ if (triggerOnContentEditable) {
562
+ return !tagsToIgnore.includes(event.target.tagName);
563
+ }
564
+ return !event.target.isContentEditable && !tagsToIgnore.includes(event.target.tagName);
565
+ }
566
+ return true;
567
+ }
568
+ function useShortcuts(hotkeys, tagsToIgnore = ["INPUT", "TEXTAREA", "SELECT"], triggerOnContentEditable = false) {
569
+ (0, import_react17.useEffect)(() => {
570
+ const keydownListener = (event) => {
571
+ hotkeys.forEach(
572
+ ([hotkey, handler, options = { preventDefault: true }]) => {
573
+ if (getHotkeyMatcher(hotkey)(event) && shouldFireEvent(event, tagsToIgnore, triggerOnContentEditable)) {
574
+ if (options.preventDefault) {
575
+ event.preventDefault();
576
+ }
577
+ handler(event);
578
+ }
579
+ }
580
+ );
581
+ };
582
+ document.documentElement.addEventListener("keydown", keydownListener);
583
+ return () => document.documentElement.removeEventListener("keydown", keydownListener);
584
+ }, [hotkeys]);
585
+ }
494
586
  // Annotate the CommonJS export names for ESM import in node:
495
587
  0 && (module.exports = {
588
+ getHotkeyHandler,
589
+ getHotkeyMatcher,
590
+ parseHotkey,
496
591
  reducer,
497
592
  toast,
498
593
  useBreakpoint,
@@ -504,6 +599,7 @@ function useClickOutside(handler, events, nodes) {
504
599
  useMeasureDirty,
505
600
  useMediaQuery,
506
601
  useMultiStepDialog,
602
+ useShortcuts,
507
603
  useTabs,
508
604
  useToast,
509
605
  useWindowSize
@@ -1,5 +1,8 @@
1
1
  "use client";
2
2
  import {
3
+ getHotkeyHandler,
4
+ getHotkeyMatcher,
5
+ parseHotkey,
3
6
  reducer,
4
7
  toast,
5
8
  useClipboard,
@@ -9,15 +12,19 @@ import {
9
12
  useMeasureDirty,
10
13
  useMediaQuery,
11
14
  useMultiStepDialog,
15
+ useShortcuts,
12
16
  useTabs,
13
17
  useToast,
14
18
  useWindowSize
15
- } from "../chunk-OPYDG34F.mjs";
19
+ } from "../chunk-ZBUBNKF6.mjs";
16
20
  import {
17
21
  useBreakpoint,
18
22
  useClickOutside
19
23
  } from "../chunk-SYGWSBJL.mjs";
20
24
  export {
25
+ getHotkeyHandler,
26
+ getHotkeyMatcher,
27
+ parseHotkey,
21
28
  reducer,
22
29
  toast,
23
30
  useBreakpoint,
@@ -29,6 +36,7 @@ export {
29
36
  useMeasureDirty,
30
37
  useMediaQuery,
31
38
  useMultiStepDialog,
39
+ useShortcuts,
32
40
  useTabs,
33
41
  useToast,
34
42
  useWindowSize
@@ -0,0 +1,63 @@
1
+ import * as React from 'react';
2
+ import { DialogProps } from '@radix-ui/react-dialog';
3
+ import { Command as Command$1 } from 'cmdk';
4
+
5
+ type DirectionType = "rtl" | "ltr";
6
+ type PositionType = "top" | "bottom" | "right" | "left";
7
+
8
+ interface CommandProps extends React.ComponentPropsWithoutRef<typeof Command$1> {
9
+ }
10
+ interface CommandDialogProps extends DialogProps {
11
+ }
12
+ interface CommandInputProps extends React.ComponentPropsWithoutRef<typeof Command$1.Input> {
13
+ }
14
+ interface CommandListProps extends React.ComponentPropsWithoutRef<typeof Command$1.List> {
15
+ }
16
+ interface CommandEmptyProps extends React.ComponentPropsWithoutRef<typeof Command$1.Empty> {
17
+ }
18
+ interface CommandGroupProps extends React.ComponentPropsWithoutRef<typeof Command$1.Group> {
19
+ }
20
+ interface CommandSeparatorProps extends React.ComponentPropsWithoutRef<typeof Command$1.Separator> {
21
+ }
22
+ interface CommandItemProps extends React.ComponentPropsWithoutRef<typeof Command$1.Item> {
23
+ }
24
+ interface CommandShortcutProps extends React.HTMLAttributes<HTMLSpanElement> {
25
+ }
26
+ declare const Command: React.ForwardRefExoticComponent<CommandProps & React.RefAttributes<HTMLDivElement>>;
27
+ declare const CommandDialog: ({ children, ...props }: CommandDialogProps) => React.JSX.Element;
28
+ declare const CommandInput: React.ForwardRefExoticComponent<CommandInputProps & React.RefAttributes<HTMLInputElement>>;
29
+ declare const CommandList: React.ForwardRefExoticComponent<CommandListProps & React.RefAttributes<HTMLDivElement>>;
30
+ declare const CommandEmpty: React.ForwardRefExoticComponent<CommandEmptyProps & React.RefAttributes<HTMLDivElement>>;
31
+ declare const CommandGroup: React.ForwardRefExoticComponent<CommandGroupProps & React.RefAttributes<HTMLDivElement>>;
32
+ declare const CommandSeparator: React.ForwardRefExoticComponent<CommandSeparatorProps & React.RefAttributes<HTMLDivElement>>;
33
+ declare const CommandItem: React.ForwardRefExoticComponent<CommandItemProps & React.RefAttributes<HTMLDivElement>>;
34
+ declare const CommandShortcut: {
35
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement> & CommandShortcutProps): React.JSX.Element;
36
+ displayName: string;
37
+ };
38
+ type FullCommandItem = {
39
+ type: "group" | "separator";
40
+ heading?: string;
41
+ items?: {
42
+ icon: React.ElementType;
43
+ text: string;
44
+ action: () => void;
45
+ shortcut?: string;
46
+ }[];
47
+ };
48
+ type FullCommandProps = {
49
+ items: FullCommandItem[];
50
+ direction?: DirectionType;
51
+ texts?: {
52
+ searchPlaceholder?: string;
53
+ emptyText?: string;
54
+ };
55
+ };
56
+ declare const FullCommand: ({ items, direction, texts }: FullCommandProps) => React.JSX.Element;
57
+ type AppCommandProps = {
58
+ commandProps: FullCommandProps;
59
+ dialogProps: DialogProps;
60
+ };
61
+ declare const AppCommand: ({ commandProps, dialogProps }: AppCommandProps) => React.JSX.Element;
62
+
63
+ export { AppCommand as A, type CommandInputProps as C, type DirectionType as D, FullCommand as F, type PositionType as P, Command as a, CommandDialog as b, CommandInput as c, CommandList as d, CommandEmpty as e, CommandGroup as f, CommandItem as g, CommandShortcut as h, CommandSeparator as i };
@@ -0,0 +1,63 @@
1
+ import * as React from 'react';
2
+ import { DialogProps } from '@radix-ui/react-dialog';
3
+ import { Command as Command$1 } from 'cmdk';
4
+
5
+ type DirectionType = "rtl" | "ltr";
6
+ type PositionType = "top" | "bottom" | "right" | "left";
7
+
8
+ interface CommandProps extends React.ComponentPropsWithoutRef<typeof Command$1> {
9
+ }
10
+ interface CommandDialogProps extends DialogProps {
11
+ }
12
+ interface CommandInputProps extends React.ComponentPropsWithoutRef<typeof Command$1.Input> {
13
+ }
14
+ interface CommandListProps extends React.ComponentPropsWithoutRef<typeof Command$1.List> {
15
+ }
16
+ interface CommandEmptyProps extends React.ComponentPropsWithoutRef<typeof Command$1.Empty> {
17
+ }
18
+ interface CommandGroupProps extends React.ComponentPropsWithoutRef<typeof Command$1.Group> {
19
+ }
20
+ interface CommandSeparatorProps extends React.ComponentPropsWithoutRef<typeof Command$1.Separator> {
21
+ }
22
+ interface CommandItemProps extends React.ComponentPropsWithoutRef<typeof Command$1.Item> {
23
+ }
24
+ interface CommandShortcutProps extends React.HTMLAttributes<HTMLSpanElement> {
25
+ }
26
+ declare const Command: React.ForwardRefExoticComponent<CommandProps & React.RefAttributes<HTMLDivElement>>;
27
+ declare const CommandDialog: ({ children, ...props }: CommandDialogProps) => React.JSX.Element;
28
+ declare const CommandInput: React.ForwardRefExoticComponent<CommandInputProps & React.RefAttributes<HTMLInputElement>>;
29
+ declare const CommandList: React.ForwardRefExoticComponent<CommandListProps & React.RefAttributes<HTMLDivElement>>;
30
+ declare const CommandEmpty: React.ForwardRefExoticComponent<CommandEmptyProps & React.RefAttributes<HTMLDivElement>>;
31
+ declare const CommandGroup: React.ForwardRefExoticComponent<CommandGroupProps & React.RefAttributes<HTMLDivElement>>;
32
+ declare const CommandSeparator: React.ForwardRefExoticComponent<CommandSeparatorProps & React.RefAttributes<HTMLDivElement>>;
33
+ declare const CommandItem: React.ForwardRefExoticComponent<CommandItemProps & React.RefAttributes<HTMLDivElement>>;
34
+ declare const CommandShortcut: {
35
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement> & CommandShortcutProps): React.JSX.Element;
36
+ displayName: string;
37
+ };
38
+ type FullCommandItem = {
39
+ type: "group" | "separator";
40
+ heading?: string;
41
+ items?: {
42
+ icon: React.ElementType;
43
+ text: string;
44
+ action: () => void;
45
+ shortcut?: string;
46
+ }[];
47
+ };
48
+ type FullCommandProps = {
49
+ items: FullCommandItem[];
50
+ direction?: DirectionType;
51
+ texts?: {
52
+ searchPlaceholder?: string;
53
+ emptyText?: string;
54
+ };
55
+ };
56
+ declare const FullCommand: ({ items, direction, texts }: FullCommandProps) => React.JSX.Element;
57
+ type AppCommandProps = {
58
+ commandProps: FullCommandProps;
59
+ dialogProps: DialogProps;
60
+ };
61
+ declare const AppCommand: ({ commandProps, dialogProps }: AppCommandProps) => React.JSX.Element;
62
+
63
+ export { AppCommand as A, type CommandInputProps as C, type DirectionType as D, FullCommand as F, type PositionType as P, Command as a, CommandDialog as b, CommandInput as c, CommandList as d, CommandEmpty as e, CommandGroup as f, CommandItem as g, CommandShortcut as h, CommandSeparator as i };
package/dist/index.css CHANGED
@@ -1353,6 +1353,9 @@ input[type="number"]::-webkit-inner-spin-button,
1353
1353
  .\!hawa-h-8 {
1354
1354
  height: 2rem !important;
1355
1355
  }
1356
+ .\!hawa-h-full {
1357
+ height: 100% !important;
1358
+ }
1356
1359
  .hawa-h-0 {
1357
1360
  height: 0px;
1358
1361
  }
@@ -1526,6 +1529,9 @@ input[type="number"]::-webkit-inner-spin-button,
1526
1529
  .hawa-max-h-screen {
1527
1530
  max-height: 100vh;
1528
1531
  }
1532
+ .\!hawa-min-h-\[50\%\] {
1533
+ min-height: 50% !important;
1534
+ }
1529
1535
  .hawa-min-h-20 {
1530
1536
  min-height: 5rem;
1531
1537
  }
@@ -1659,6 +1665,9 @@ input[type="number"]::-webkit-inner-spin-button,
1659
1665
  .hawa-w-\[47px\] {
1660
1666
  width: 47px;
1661
1667
  }
1668
+ .hawa-w-\[50px\] {
1669
+ width: 50px;
1670
+ }
1662
1671
  .hawa-w-\[72px\] {
1663
1672
  width: 72px;
1664
1673
  }
@@ -1931,6 +1940,9 @@ input[type="number"]::-webkit-inner-spin-button,
1931
1940
  .hawa-flex-wrap {
1932
1941
  flex-wrap: wrap;
1933
1942
  }
1943
+ .hawa-flex-nowrap {
1944
+ flex-wrap: nowrap;
1945
+ }
1934
1946
  .hawa-items-start {
1935
1947
  align-items: flex-start;
1936
1948
  }
@@ -2332,12 +2344,12 @@ input[type="number"]::-webkit-inner-spin-button,
2332
2344
  --tw-bg-opacity: 1;
2333
2345
  background-color: hsl(var(--error) / var(--tw-bg-opacity));
2334
2346
  }
2347
+ .hawa-bg-foreground\/20 {
2348
+ background-color: hsl(var(--foreground) / 0.2);
2349
+ }
2335
2350
  .hawa-bg-foreground\/5 {
2336
2351
  background-color: hsl(var(--foreground) / 0.05);
2337
2352
  }
2338
- .hawa-bg-foreground\/80 {
2339
- background-color: hsl(var(--foreground) / 0.8);
2340
- }
2341
2353
  .hawa-bg-gray-200 {
2342
2354
  --tw-bg-opacity: 1;
2343
2355
  background-color: rgb(229 231 235 / var(--tw-bg-opacity));
@@ -3113,6 +3125,11 @@ input[type="number"]::-webkit-inner-spin-button,
3113
3125
  --tw-drop-shadow: drop-shadow(0 0 #0000);
3114
3126
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
3115
3127
  }
3128
+ .hawa-backdrop-blur-\[2px\] {
3129
+ --tw-backdrop-blur: blur(2px);
3130
+ -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
3131
+ backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
3132
+ }
3116
3133
  .hawa-backdrop-blur-sm {
3117
3134
  --tw-backdrop-blur: blur(4px);
3118
3135
  -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
package/dist/index.d.mts CHANGED
@@ -579,6 +579,30 @@ declare const CommandShortcut: {
579
579
  ({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement> & CommandShortcutProps): React$1.JSX.Element;
580
580
  displayName: string;
581
581
  };
582
+ type FullCommandItem = {
583
+ type: "group" | "separator";
584
+ heading?: string;
585
+ items?: {
586
+ icon: React$1.ElementType;
587
+ text: string;
588
+ action: () => void;
589
+ shortcut?: string;
590
+ }[];
591
+ };
592
+ type FullCommandProps = {
593
+ items: FullCommandItem[];
594
+ direction?: DirectionType;
595
+ texts?: {
596
+ searchPlaceholder?: string;
597
+ emptyText?: string;
598
+ };
599
+ };
600
+ declare const FullCommand: ({ items, direction, texts }: FullCommandProps) => React$1.JSX.Element;
601
+ type AppCommandProps = {
602
+ commandProps: FullCommandProps;
603
+ dialogProps: DialogProps;
604
+ };
605
+ declare const AppCommand: ({ commandProps, dialogProps }: AppCommandProps) => React$1.JSX.Element;
582
606
 
583
607
  type ComboboxTypes<T> = {
584
608
  labelKey?: keyof T | any;
@@ -672,7 +696,9 @@ type TabsVariants = "default" | "underlined" | "underlined_tabs";
672
696
  declare const Tabs: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
673
697
  variant?: TabsVariants | undefined;
674
698
  } & React$1.RefAttributes<HTMLDivElement>>;
675
- declare const TabsList: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
699
+ declare const TabsList: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
700
+ scrollable?: boolean | undefined;
701
+ } & React$1.RefAttributes<HTMLDivElement>>;
676
702
  declare const TabsTrigger: React$1.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
677
703
  chipProps?: ChipTypes | undefined;
678
704
  className?: string | undefined;
@@ -2157,4 +2183,28 @@ declare const useMeasureDirty: (ref: RefObject<HTMLElement>) => ContentRect;
2157
2183
 
2158
2184
  declare function useClickOutside<T extends HTMLElement = any>(handler: () => void, events?: string[] | null, nodes?: (HTMLElement | null)[]): React$1.MutableRefObject<T | undefined>;
2159
2185
 
2160
- export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionRoot, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppLanding, AppLayout, type AppSidebarItemProps, AppStores, AppTabs, AppTopbar, AuthButtons, Avatar, BackToTop, Badge, BadgedComponent, Breadcrumb, type BreadcrumbItemProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CheckEmail, Checkbox, Chip, type ChipColors, type ChipTypes, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, type CommandInputProps, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, ContactForm, type ContentRect, Copyrights, Count, DataTable, DestroyableCard, Dialog, DialogBody, DialogCarousel, DialogCarouselContent, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogStep, DialogSteps, DialogTitle, DialogTrigger, DocsLayout, DocsSidebar, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadio, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, FileUploader, HorizontalPricing, Input, InterfaceSettings, ItemCard, Label, type LabelProps, LandingCard, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, type MenuItemType, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navbar, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem$1 as NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuRoot, NavigationMenuTrigger, NavigationMenuViewport, NewPasswordForm, NoPermission, NotFound, Pagination, PasswordInput, PasswordStrengthIndicator, PhoneInput, type PhoneInputProps, PhoneMockup, PinInput, Popover, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, PricingCard, PricingPlans, Progress, ProgressCircle, Radio, type RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, ScrollIndicator, Select, type SelectOptionProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, StandardNavigationMenuItem, Stats, StopPropagationWrapper, type SubItem$1 as SubItem, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Testimonial, type TextFieldTypes, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, type ToasterToastProps, Tooltip, Usage, type UseFocusWithinOptions, type UseMediaQueryOptions, UserReferralSource, buttonVariants, navigationMenuTriggerStyle, reducer, toast, useBreakpoint, useClickOutside, useClipboard, useDialogCarousel, useFocusWithin, useIsomorphicEffect, useMeasureDirty, useMediaQuery, useMultiStepDialog, useTabs, useToast, useWindowSize };
2186
+ type KeyboardModifiers = {
2187
+ alt: boolean;
2188
+ ctrl: boolean;
2189
+ meta: boolean;
2190
+ mod: boolean;
2191
+ shift: boolean;
2192
+ };
2193
+ type Hotkey = KeyboardModifiers & {
2194
+ key?: string;
2195
+ };
2196
+ type CheckHotkeyMatch = (event: KeyboardEvent) => boolean;
2197
+ declare function parseHotkey(hotkey: string): Hotkey;
2198
+ declare function getHotkeyMatcher(hotkey: string): CheckHotkeyMatch;
2199
+ interface HotkeyItemOptions {
2200
+ preventDefault?: boolean;
2201
+ }
2202
+ declare function getHotkeyHandler(hotkeys: HotkeyItem[]): (event: React.KeyboardEvent<HTMLElement> | KeyboardEvent) => void;
2203
+ type HotkeyItem = [
2204
+ string,
2205
+ (event: KeyboardEvent) => void,
2206
+ HotkeyItemOptions?
2207
+ ];
2208
+ declare function useShortcuts(hotkeys: HotkeyItem[], tagsToIgnore?: string[], triggerOnContentEditable?: boolean): void;
2209
+
2210
+ export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionRoot, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppCommand, AppLanding, AppLayout, type AppSidebarItemProps, AppStores, AppTabs, AppTopbar, AuthButtons, Avatar, BackToTop, Badge, BadgedComponent, Breadcrumb, type BreadcrumbItemProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CheckEmail, Checkbox, Chip, type ChipColors, type ChipTypes, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, type CommandInputProps, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, ContactForm, type ContentRect, Copyrights, Count, DataTable, DestroyableCard, Dialog, DialogBody, DialogCarousel, DialogCarouselContent, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogStep, DialogSteps, DialogTitle, DialogTrigger, DocsLayout, DocsSidebar, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadio, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, FileUploader, FullCommand, HorizontalPricing, type Hotkey, type HotkeyItem, type HotkeyItemOptions, Input, InterfaceSettings, ItemCard, type KeyboardModifiers, Label, type LabelProps, LandingCard, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, type MenuItemType, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navbar, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem$1 as NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuRoot, NavigationMenuTrigger, NavigationMenuViewport, NewPasswordForm, NoPermission, NotFound, Pagination, PasswordInput, PasswordStrengthIndicator, PhoneInput, type PhoneInputProps, PhoneMockup, PinInput, Popover, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, PricingCard, PricingPlans, Progress, ProgressCircle, Radio, type RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, ScrollIndicator, Select, type SelectOptionProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, StandardNavigationMenuItem, Stats, StopPropagationWrapper, type SubItem$1 as SubItem, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Testimonial, type TextFieldTypes, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, type ToasterToastProps, Tooltip, Usage, type UseFocusWithinOptions, type UseMediaQueryOptions, UserReferralSource, buttonVariants, getHotkeyHandler, getHotkeyMatcher, navigationMenuTriggerStyle, parseHotkey, reducer, toast, useBreakpoint, useClickOutside, useClipboard, useDialogCarousel, useFocusWithin, useIsomorphicEffect, useMeasureDirty, useMediaQuery, useMultiStepDialog, useShortcuts, useTabs, useToast, useWindowSize };