@shwfed/nuxt 0.1.20 → 0.1.22

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 (117) hide show
  1. package/dist/module.d.mts +1 -1
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +9 -2
  4. package/dist/runtime/components/app.d.vue.ts +2 -2
  5. package/dist/runtime/components/app.vue +58 -3
  6. package/dist/runtime/components/app.vue.d.ts +2 -2
  7. package/dist/runtime/components/table.d.vue.ts +12 -3
  8. package/dist/runtime/components/table.vue +44 -82
  9. package/dist/runtime/components/table.vue.d.ts +12 -3
  10. package/dist/runtime/components/ui/button/index.d.ts +1 -1
  11. package/dist/runtime/components/ui/button-group/ButtonGroup.d.vue.ts +19 -0
  12. package/dist/runtime/components/ui/button-group/ButtonGroup.vue +19 -0
  13. package/dist/runtime/components/ui/button-group/ButtonGroup.vue.d.ts +19 -0
  14. package/dist/runtime/components/ui/button-group/ButtonGroupSeparator.d.vue.ts +10 -0
  15. package/dist/runtime/components/ui/button-group/ButtonGroupSeparator.vue +25 -0
  16. package/dist/runtime/components/ui/button-group/ButtonGroupSeparator.vue.d.ts +10 -0
  17. package/dist/runtime/components/ui/button-group/ButtonGroupText.d.vue.ts +22 -0
  18. package/dist/runtime/components/ui/button-group/ButtonGroupText.vue +23 -0
  19. package/dist/runtime/components/ui/button-group/ButtonGroupText.vue.d.ts +22 -0
  20. package/dist/runtime/components/ui/button-group/index.d.ts +8 -0
  21. package/dist/runtime/components/ui/button-group/index.js +18 -0
  22. package/dist/runtime/components/ui/checkbox/Checkbox.d.vue.ts +25 -0
  23. package/dist/runtime/components/ui/checkbox/Checkbox.vue +47 -0
  24. package/dist/runtime/components/ui/checkbox/Checkbox.vue.d.ts +25 -0
  25. package/dist/runtime/components/ui/checkbox/index.d.ts +1 -0
  26. package/dist/runtime/components/ui/checkbox/index.js +1 -0
  27. package/dist/runtime/components/ui/command/Command.d.vue.ts +36 -0
  28. package/dist/runtime/components/ui/command/Command.vue +81 -0
  29. package/dist/runtime/components/ui/command/Command.vue.d.ts +36 -0
  30. package/dist/runtime/components/{tooltip.d.vue.ts → ui/command/CommandDialog.d.vue.ts} +13 -6
  31. package/dist/runtime/components/ui/command/CommandDialog.vue +34 -0
  32. package/dist/runtime/components/{tooltip.vue.d.ts → ui/command/CommandDialog.vue.d.ts} +13 -6
  33. package/dist/runtime/components/ui/command/CommandEmpty.d.vue.ts +18 -0
  34. package/dist/runtime/components/ui/command/CommandEmpty.vue +28 -0
  35. package/dist/runtime/components/ui/command/CommandEmpty.vue.d.ts +18 -0
  36. package/dist/runtime/components/ui/command/CommandGroup.d.vue.ts +19 -0
  37. package/dist/runtime/components/ui/command/CommandGroup.vue +44 -0
  38. package/dist/runtime/components/ui/command/CommandGroup.vue.d.ts +19 -0
  39. package/dist/runtime/components/ui/command/CommandInput.d.vue.ts +8 -0
  40. package/dist/runtime/components/ui/command/CommandInput.vue +40 -0
  41. package/dist/runtime/components/ui/command/CommandInput.vue.d.ts +8 -0
  42. package/dist/runtime/components/ui/command/CommandItem.d.vue.ts +22 -0
  43. package/dist/runtime/components/ui/command/CommandItem.vue +65 -0
  44. package/dist/runtime/components/ui/command/CommandItem.vue.d.ts +22 -0
  45. package/dist/runtime/components/ui/command/CommandList.d.vue.ts +18 -0
  46. package/dist/runtime/components/ui/command/CommandList.vue +24 -0
  47. package/dist/runtime/components/ui/command/CommandList.vue.d.ts +18 -0
  48. package/dist/runtime/components/ui/command/CommandSeparator.d.vue.ts +18 -0
  49. package/dist/runtime/components/ui/command/CommandSeparator.vue +23 -0
  50. package/dist/runtime/components/ui/command/CommandSeparator.vue.d.ts +18 -0
  51. package/dist/runtime/components/{dialog.d.vue.ts → ui/command/CommandShortcut.d.vue.ts} +5 -10
  52. package/dist/runtime/components/ui/command/CommandShortcut.vue +15 -0
  53. package/dist/runtime/components/{dialog.vue.d.ts → ui/command/CommandShortcut.vue.d.ts} +5 -10
  54. package/dist/runtime/components/ui/command/index.d.ts +90 -0
  55. package/dist/runtime/components/ui/command/index.js +12 -0
  56. package/dist/runtime/components/ui/dialog/Dialog.d.vue.ts +21 -0
  57. package/dist/runtime/components/ui/dialog/Dialog.vue +20 -0
  58. package/dist/runtime/components/ui/dialog/Dialog.vue.d.ts +21 -0
  59. package/dist/runtime/components/ui/dialog/DialogClose.d.vue.ts +14 -0
  60. package/dist/runtime/components/ui/dialog/DialogClose.vue +16 -0
  61. package/dist/runtime/components/ui/dialog/DialogClose.vue.d.ts +14 -0
  62. package/dist/runtime/components/ui/dialog/DialogContent.d.vue.ts +35 -0
  63. package/dist/runtime/components/ui/dialog/DialogContent.vue +53 -0
  64. package/dist/runtime/components/ui/dialog/DialogContent.vue.d.ts +35 -0
  65. package/dist/runtime/components/ui/dialog/DialogDescription.d.vue.ts +18 -0
  66. package/dist/runtime/components/ui/dialog/DialogDescription.vue +22 -0
  67. package/dist/runtime/components/ui/dialog/DialogDescription.vue.d.ts +18 -0
  68. package/dist/runtime/components/ui/dialog/DialogFooter.d.vue.ts +17 -0
  69. package/dist/runtime/components/ui/dialog/DialogFooter.vue +15 -0
  70. package/dist/runtime/components/ui/dialog/DialogFooter.vue.d.ts +17 -0
  71. package/dist/runtime/components/ui/dialog/DialogHeader.d.vue.ts +17 -0
  72. package/dist/runtime/components/ui/dialog/DialogHeader.vue +15 -0
  73. package/dist/runtime/components/ui/dialog/DialogHeader.vue.d.ts +17 -0
  74. package/dist/runtime/components/ui/dialog/DialogOverlay.d.vue.ts +18 -0
  75. package/dist/runtime/components/ui/dialog/DialogOverlay.vue +22 -0
  76. package/dist/runtime/components/ui/dialog/DialogOverlay.vue.d.ts +18 -0
  77. package/dist/runtime/components/ui/dialog/DialogScrollContent.d.vue.ts +32 -0
  78. package/dist/runtime/components/ui/dialog/DialogScrollContent.vue +58 -0
  79. package/dist/runtime/components/ui/dialog/DialogScrollContent.vue.d.ts +32 -0
  80. package/dist/runtime/components/ui/dialog/DialogTitle.d.vue.ts +18 -0
  81. package/dist/runtime/components/ui/dialog/DialogTitle.vue +22 -0
  82. package/dist/runtime/components/ui/dialog/DialogTitle.vue.d.ts +18 -0
  83. package/dist/runtime/components/ui/dialog/DialogTrigger.d.vue.ts +14 -0
  84. package/dist/runtime/components/ui/dialog/DialogTrigger.vue +16 -0
  85. package/dist/runtime/components/ui/dialog/DialogTrigger.vue.d.ts +14 -0
  86. package/dist/runtime/components/ui/dialog/index.d.ts +10 -0
  87. package/dist/runtime/components/ui/dialog/index.js +10 -0
  88. package/dist/runtime/components/ui/separator/Separator.d.vue.ts +1 -1
  89. package/dist/runtime/components/ui/separator/Separator.vue.d.ts +1 -1
  90. package/dist/runtime/components/ui/tooltip/Tooltip.d.vue.ts +20 -0
  91. package/dist/runtime/components/ui/tooltip/Tooltip.vue +24 -0
  92. package/dist/runtime/components/ui/tooltip/Tooltip.vue.d.ts +20 -0
  93. package/dist/runtime/components/ui/tooltip/TooltipContent.d.vue.ts +26 -0
  94. package/dist/runtime/components/ui/tooltip/TooltipContent.vue +58 -0
  95. package/dist/runtime/components/ui/tooltip/TooltipContent.vue.d.ts +26 -0
  96. package/dist/runtime/components/ui/tooltip/TooltipProvider.d.vue.ts +16 -0
  97. package/dist/runtime/components/ui/tooltip/TooltipProvider.vue +17 -0
  98. package/dist/runtime/components/ui/tooltip/TooltipProvider.vue.d.ts +16 -0
  99. package/dist/runtime/components/ui/tooltip/TooltipTrigger.d.vue.ts +14 -0
  100. package/dist/runtime/components/ui/tooltip/TooltipTrigger.vue +17 -0
  101. package/dist/runtime/components/ui/tooltip/TooltipTrigger.vue.d.ts +14 -0
  102. package/dist/runtime/components/ui/tooltip/index.d.ts +4 -0
  103. package/dist/runtime/components/ui/tooltip/index.js +4 -0
  104. package/dist/runtime/plugins/cel/env.d.ts +5 -1
  105. package/dist/runtime/plugins/cel/env.js +3 -1
  106. package/dist/runtime/plugins/cel/index.d.ts +12 -4
  107. package/dist/runtime/plugins/cel/index.js +8 -6
  108. package/dist/runtime/plugins/i18n/index.d.ts +2 -0
  109. package/dist/runtime/plugins/i18n/index.js +14 -0
  110. package/dist/runtime/plugins/markdown/index.js +1 -1
  111. package/dist/runtime/table-renderers/builtins.js +13 -30
  112. package/package.json +3 -1
  113. package/dist/runtime/components/dialog.vue +0 -64
  114. package/dist/runtime/components/markdown.d.vue.ts +0 -19
  115. package/dist/runtime/components/markdown.vue +0 -52
  116. package/dist/runtime/components/markdown.vue.d.ts +0 -19
  117. package/dist/runtime/components/tooltip.vue +0 -48
@@ -0,0 +1,25 @@
1
+ import type { CheckboxRootProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = CheckboxRootProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_14: {
7
+ modelValue: import("reka-ui").CheckboxCheckedState;
8
+ state: import("reka-ui").CheckboxCheckedState;
9
+ };
10
+ type __VLS_Slots = {} & {
11
+ default?: (props: typeof __VLS_14) => any;
12
+ };
13
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ "update:modelValue": (value: boolean | "indeterminate") => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ "onUpdate:modelValue"?: ((value: boolean | "indeterminate") => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,47 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { Icon } from "@iconify/vue";
4
+ import { CheckboxIndicator, CheckboxRoot, useForwardPropsEmits } from "reka-ui";
5
+ import { cn } from "../../../utils/cn";
6
+ const props = defineProps({
7
+ defaultValue: { type: [Boolean, String], required: false },
8
+ modelValue: { type: [Boolean, String, null], required: false },
9
+ disabled: { type: Boolean, required: false },
10
+ value: { type: null, required: false },
11
+ id: { type: String, required: false },
12
+ asChild: { type: Boolean, required: false },
13
+ as: { type: null, required: false },
14
+ name: { type: String, required: false },
15
+ required: { type: Boolean, required: false },
16
+ class: { type: null, required: false }
17
+ });
18
+ const emits = defineEmits(["update:modelValue"]);
19
+ const delegatedProps = reactiveOmit(props, "class");
20
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
21
+ </script>
22
+
23
+ <template>
24
+ <CheckboxRoot
25
+ v-slot="slotProps"
26
+ data-slot="checkbox"
27
+ v-bind="forwarded"
28
+ :class="
29
+ cn(
30
+ 'peer cursor-pointer flex items-center justify-center border-zinc-200 data-[state=checked]:bg-(--primary) data-[state=checked]:text-white data-[state=checked]:border-(--primary) aria-invalid:border-red-400 size-4 shrink-0 rounded border shadow-xs hover:shadow transition-shadow outline-none disabled:cursor-not-allowed disabled:opacity-50',
31
+ props.class
32
+ )
33
+ "
34
+ >
35
+ <CheckboxIndicator
36
+ data-slot="checkbox-indicator"
37
+ class="grid h-full w-full place-content-center transition-none text-xs"
38
+ >
39
+ <slot v-bind="slotProps">
40
+ <Icon
41
+ v-if="$props.modelValue === true"
42
+ icon="fluent:checkmark-20-filled"
43
+ />
44
+ </slot>
45
+ </CheckboxIndicator>
46
+ </CheckboxRoot>
47
+ </template>
@@ -0,0 +1,25 @@
1
+ import type { CheckboxRootProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = CheckboxRootProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_14: {
7
+ modelValue: import("reka-ui").CheckboxCheckedState;
8
+ state: import("reka-ui").CheckboxCheckedState;
9
+ };
10
+ type __VLS_Slots = {} & {
11
+ default?: (props: typeof __VLS_14) => any;
12
+ };
13
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ "update:modelValue": (value: boolean | "indeterminate") => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ "onUpdate:modelValue"?: ((value: boolean | "indeterminate") => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1 @@
1
+ export { default as Checkbox } from './Checkbox.vue.js';
@@ -0,0 +1 @@
1
+ export { default as Checkbox } from "./Checkbox.vue";
@@ -0,0 +1,36 @@
1
+ import type { ListboxRootProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = ListboxRootProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_8: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_8) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:modelValue": (value: import("reka-ui").AcceptableValue) => any;
12
+ highlight: (payload: {
13
+ ref: HTMLElement;
14
+ value: import("reka-ui").AcceptableValue;
15
+ } | undefined) => any;
16
+ entryFocus: (event: CustomEvent<any>) => any;
17
+ leave: (event: Event) => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
19
+ "onUpdate:modelValue"?: ((value: import("reka-ui").AcceptableValue) => any) | undefined;
20
+ onHighlight?: ((payload: {
21
+ ref: HTMLElement;
22
+ value: import("reka-ui").AcceptableValue;
23
+ } | undefined) => any) | undefined;
24
+ onEntryFocus?: ((event: CustomEvent<any>) => any) | undefined;
25
+ onLeave?: ((event: Event) => any) | undefined;
26
+ }>, {
27
+ modelValue: import("reka-ui").AcceptableValue | import("reka-ui").AcceptableValue[];
28
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
29
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
32
+ type __VLS_WithSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
@@ -0,0 +1,81 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { ListboxRoot, useFilter, useForwardPropsEmits } from "reka-ui";
4
+ import { reactive, ref, watch } from "vue";
5
+ import { cn } from "../../../utils/cn";
6
+ import { provideCommandContext } from ".";
7
+ const props = defineProps({
8
+ modelValue: { type: null, required: false, default: "" },
9
+ defaultValue: { type: null, required: false },
10
+ multiple: { type: Boolean, required: false },
11
+ orientation: { type: String, required: false },
12
+ dir: { type: String, required: false },
13
+ disabled: { type: Boolean, required: false },
14
+ selectionBehavior: { type: String, required: false },
15
+ highlightOnHover: { type: Boolean, required: false },
16
+ by: { type: [String, Function], required: false },
17
+ asChild: { type: Boolean, required: false },
18
+ as: { type: null, required: false },
19
+ name: { type: String, required: false },
20
+ required: { type: Boolean, required: false },
21
+ class: { type: null, required: false }
22
+ });
23
+ const emits = defineEmits(["update:modelValue", "highlight", "entryFocus", "leave"]);
24
+ const delegatedProps = reactiveOmit(props, "class");
25
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
26
+ const allItems = ref(/* @__PURE__ */ new Map());
27
+ const allGroups = ref(/* @__PURE__ */ new Map());
28
+ const { contains } = useFilter({ sensitivity: "base" });
29
+ const filterState = reactive({
30
+ search: "",
31
+ filtered: {
32
+ /** The count of all visible items. */
33
+ count: 0,
34
+ /** Map from visible item id to its search score. */
35
+ items: /* @__PURE__ */ new Map(),
36
+ /** Set of groups with at least one visible item. */
37
+ groups: /* @__PURE__ */ new Set()
38
+ }
39
+ });
40
+ function filterItems() {
41
+ if (!filterState.search) {
42
+ filterState.filtered.count = allItems.value.size;
43
+ return;
44
+ }
45
+ filterState.filtered.groups = /* @__PURE__ */ new Set();
46
+ let itemCount = 0;
47
+ for (const [id, value] of allItems.value) {
48
+ const score = contains(value, filterState.search);
49
+ filterState.filtered.items.set(id, score ? 1 : 0);
50
+ if (score)
51
+ itemCount++;
52
+ }
53
+ for (const [groupId, group] of allGroups.value) {
54
+ for (const itemId of group) {
55
+ if (filterState.filtered.items.get(itemId) > 0) {
56
+ filterState.filtered.groups.add(groupId);
57
+ break;
58
+ }
59
+ }
60
+ }
61
+ filterState.filtered.count = itemCount;
62
+ }
63
+ watch(() => filterState.search, () => {
64
+ filterItems();
65
+ });
66
+ provideCommandContext({
67
+ allItems,
68
+ allGroups,
69
+ filterState
70
+ });
71
+ </script>
72
+
73
+ <template>
74
+ <ListboxRoot
75
+ data-slot="command"
76
+ v-bind="forwarded"
77
+ :class="cn('bg-white text-zinc-700 flex h-full w-full flex-col overflow-hidden rounded-md', props.class)"
78
+ >
79
+ <slot />
80
+ </ListboxRoot>
81
+ </template>
@@ -0,0 +1,36 @@
1
+ import type { ListboxRootProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = ListboxRootProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_8: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_8) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:modelValue": (value: import("reka-ui").AcceptableValue) => any;
12
+ highlight: (payload: {
13
+ ref: HTMLElement;
14
+ value: import("reka-ui").AcceptableValue;
15
+ } | undefined) => any;
16
+ entryFocus: (event: CustomEvent<any>) => any;
17
+ leave: (event: Event) => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
19
+ "onUpdate:modelValue"?: ((value: import("reka-ui").AcceptableValue) => any) | undefined;
20
+ onHighlight?: ((payload: {
21
+ ref: HTMLElement;
22
+ value: import("reka-ui").AcceptableValue;
23
+ } | undefined) => any) | undefined;
24
+ onEntryFocus?: ((event: CustomEvent<any>) => any) | undefined;
25
+ onLeave?: ((event: Event) => any) | undefined;
26
+ }>, {
27
+ modelValue: import("reka-ui").AcceptableValue | import("reka-ui").AcceptableValue[];
28
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
29
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
32
+ type __VLS_WithSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
@@ -1,16 +1,23 @@
1
- import { type TooltipRootProps } from 'reka-ui';
2
- type __VLS_Props = TooltipRootProps & {
3
- content?: string;
1
+ import type { DialogRootProps } from 'reka-ui';
2
+ type __VLS_Props = DialogRootProps & {
3
+ title?: string;
4
+ description?: string;
5
+ };
6
+ declare var __VLS_38: {
7
+ open: boolean;
8
+ close: () => void;
4
9
  };
5
- declare var __VLS_14: {};
6
10
  type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_14) => any;
11
+ default?: (props: typeof __VLS_38) => any;
8
12
  };
9
13
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
14
  "update:open": (value: boolean) => any;
11
15
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
16
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
13
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ }>, {
18
+ title: string;
19
+ description: string;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
21
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
22
  declare const _default: typeof __VLS_export;
16
23
  export default _default;
@@ -0,0 +1,34 @@
1
+ <script setup>
2
+ import { useForwardPropsEmits } from "reka-ui";
3
+ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "../dialog";
4
+ import Command from "./Command.vue";
5
+ const props = defineProps({
6
+ open: { type: Boolean, required: false },
7
+ defaultOpen: { type: Boolean, required: false },
8
+ modal: { type: Boolean, required: false },
9
+ title: { type: String, required: false, default: "Command Palette" },
10
+ description: { type: String, required: false, default: "Search for a command to run..." }
11
+ });
12
+ const emits = defineEmits(["update:open"]);
13
+ const forwarded = useForwardPropsEmits(props, emits);
14
+ </script>
15
+
16
+ <template>
17
+ <Dialog
18
+ v-slot="slotProps"
19
+ v-bind="forwarded"
20
+ >
21
+ <DialogContent
22
+ :show-close-button="false"
23
+ class="overflow-hidden p-0"
24
+ >
25
+ <DialogHeader class="sr-only">
26
+ <DialogTitle>{{ title }}</DialogTitle>
27
+ <DialogDescription>{{ description }}</DialogDescription>
28
+ </DialogHeader>
29
+ <Command>
30
+ <slot v-bind="slotProps" />
31
+ </Command>
32
+ </DialogContent>
33
+ </Dialog>
34
+ </template>
@@ -1,16 +1,23 @@
1
- import { type TooltipRootProps } from 'reka-ui';
2
- type __VLS_Props = TooltipRootProps & {
3
- content?: string;
1
+ import type { DialogRootProps } from 'reka-ui';
2
+ type __VLS_Props = DialogRootProps & {
3
+ title?: string;
4
+ description?: string;
5
+ };
6
+ declare var __VLS_38: {
7
+ open: boolean;
8
+ close: () => void;
4
9
  };
5
- declare var __VLS_14: {};
6
10
  type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_14) => any;
11
+ default?: (props: typeof __VLS_38) => any;
8
12
  };
9
13
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
14
  "update:open": (value: boolean) => any;
11
15
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
16
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
13
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ }>, {
18
+ title: string;
19
+ description: string;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
21
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
22
  declare const _default: typeof __VLS_export;
16
23
  export default _default;
@@ -0,0 +1,18 @@
1
+ import type { PrimitiveProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = PrimitiveProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_8: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_8) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,28 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { Primitive } from "reka-ui";
4
+ import { computed } from "vue";
5
+ import { cn } from "../../../utils/cn";
6
+ import { useCommand } from ".";
7
+ const props = defineProps({
8
+ asChild: { type: Boolean, required: false },
9
+ as: { type: null, required: false },
10
+ class: { type: null, required: false }
11
+ });
12
+ const delegatedProps = reactiveOmit(props, "class");
13
+ const { filterState } = useCommand();
14
+ const isRender = computed(
15
+ () => !!filterState.search && filterState.filtered.count === 0
16
+ );
17
+ </script>
18
+
19
+ <template>
20
+ <Primitive
21
+ v-if="isRender"
22
+ data-slot="command-empty"
23
+ v-bind="delegatedProps"
24
+ :class="cn('py-6 text-center text-sm', props.class)"
25
+ >
26
+ <slot />
27
+ </Primitive>
28
+ </template>
@@ -0,0 +1,18 @@
1
+ import type { PrimitiveProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = PrimitiveProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_8: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_8) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,19 @@
1
+ import type { ListboxGroupProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = ListboxGroupProps & {
4
+ class?: HTMLAttributes['class'];
5
+ heading?: string;
6
+ };
7
+ declare var __VLS_14: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_14) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,44 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { ListboxGroup, ListboxGroupLabel, useId } from "reka-ui";
4
+ import { computed, onMounted, onUnmounted } from "vue";
5
+ import { cn } from "../../../utils/cn";
6
+ import { provideCommandGroupContext, useCommand } from ".";
7
+ const props = defineProps({
8
+ asChild: { type: Boolean, required: false },
9
+ as: { type: null, required: false },
10
+ class: { type: null, required: false },
11
+ heading: { type: String, required: false }
12
+ });
13
+ const delegatedProps = reactiveOmit(props, "class");
14
+ const { allGroups, filterState } = useCommand();
15
+ const id = useId();
16
+ const isRender = computed(() => !filterState.search ? true : filterState.filtered.groups.has(id));
17
+ provideCommandGroupContext({ id });
18
+ onMounted(() => {
19
+ if (!allGroups.value.has(id))
20
+ allGroups.value.set(id, /* @__PURE__ */ new Set());
21
+ });
22
+ onUnmounted(() => {
23
+ allGroups.value.delete(id);
24
+ });
25
+ </script>
26
+
27
+ <template>
28
+ <ListboxGroup
29
+ v-bind="delegatedProps"
30
+ :id="id"
31
+ data-slot="command-group"
32
+ :class="cn('text-zinc-700 overflow-hidden p-1', props.class)"
33
+ :hidden="isRender ? void 0 : true"
34
+ >
35
+ <ListboxGroupLabel
36
+ v-if="heading"
37
+ data-slot="command-group-heading"
38
+ class="px-2 py-1.5 text-xs font-medium text-zinc-700"
39
+ >
40
+ {{ heading }}
41
+ </ListboxGroupLabel>
42
+ <slot />
43
+ </ListboxGroup>
44
+ </template>
@@ -0,0 +1,19 @@
1
+ import type { ListboxGroupProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = ListboxGroupProps & {
4
+ class?: HTMLAttributes['class'];
5
+ heading?: string;
6
+ };
7
+ declare var __VLS_14: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_14) => any;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,8 @@
1
+ import type { ListboxFilterProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = ListboxFilterProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,40 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { Icon } from "@iconify/vue";
4
+ import { ListboxFilter, useForwardProps } from "reka-ui";
5
+ import { cn } from "../../../utils/cn";
6
+ import { useCommand } from ".";
7
+ defineOptions({
8
+ inheritAttrs: false
9
+ });
10
+ const props = defineProps({
11
+ modelValue: { type: String, required: false },
12
+ autoFocus: { type: Boolean, required: false },
13
+ disabled: { type: Boolean, required: false },
14
+ asChild: { type: Boolean, required: false },
15
+ as: { type: null, required: false },
16
+ class: { type: null, required: false }
17
+ });
18
+ const delegatedProps = reactiveOmit(props, "class");
19
+ const forwardedProps = useForwardProps(delegatedProps);
20
+ const { filterState } = useCommand();
21
+ </script>
22
+
23
+ <template>
24
+ <div
25
+ data-slot="command-input-wrapper"
26
+ class="flex h-12 items-center gap-2 border-b border-zinc-200 px-3"
27
+ >
28
+ <Icon
29
+ icon="fluent:search-20-filled"
30
+ class="size-4 shrink-0 opacity-50"
31
+ />
32
+ <ListboxFilter
33
+ v-bind="{ ...forwardedProps, ...$attrs }"
34
+ v-model="filterState.search"
35
+ data-slot="command-input"
36
+ auto-focus
37
+ :class="cn('placeholder:text-zinc-700 flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', props.class)"
38
+ />
39
+ </div>
40
+ </template>
@@ -0,0 +1,8 @@
1
+ import type { ListboxFilterProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = ListboxFilterProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const _default: typeof __VLS_export;
8
+ export default _default;
@@ -0,0 +1,22 @@
1
+ import type { ListboxItemProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = ListboxItemProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare var __VLS_11: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_11) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ select: (event: import("reka-ui").ListboxItemSelectEvent<import("reka-ui").AcceptableValue>) => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ onSelect?: ((event: import("reka-ui").ListboxItemSelectEvent<import("reka-ui").AcceptableValue>) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,65 @@
1
+ <script setup>
2
+ import { reactiveOmit, useCurrentElement } from "@vueuse/core";
3
+ import { ListboxItem, useForwardPropsEmits, useId } from "reka-ui";
4
+ import { computed, onMounted, onUnmounted, ref } from "vue";
5
+ import { cn } from "../../../utils/cn";
6
+ import { useCommand, useCommandGroup } from ".";
7
+ const props = defineProps({
8
+ value: { type: null, required: true },
9
+ disabled: { type: Boolean, required: false },
10
+ asChild: { type: Boolean, required: false },
11
+ as: { type: null, required: false },
12
+ class: { type: null, required: false }
13
+ });
14
+ const emits = defineEmits(["select"]);
15
+ const delegatedProps = reactiveOmit(props, "class");
16
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
17
+ const id = useId();
18
+ const { filterState, allItems, allGroups } = useCommand();
19
+ const groupContext = useCommandGroup();
20
+ const isRender = computed(() => {
21
+ if (!filterState.search) {
22
+ return true;
23
+ } else {
24
+ const filteredCurrentItem = filterState.filtered.items.get(id);
25
+ if (filteredCurrentItem === void 0) {
26
+ return true;
27
+ }
28
+ return filteredCurrentItem > 0;
29
+ }
30
+ });
31
+ const itemRef = ref();
32
+ const currentElement = useCurrentElement(itemRef);
33
+ onMounted(() => {
34
+ if (!(currentElement.value instanceof HTMLElement))
35
+ return;
36
+ allItems.value.set(id, currentElement.value.textContent ?? (props.value?.toString() ?? ""));
37
+ const groupId = groupContext?.id;
38
+ if (groupId) {
39
+ if (!allGroups.value.has(groupId)) {
40
+ allGroups.value.set(groupId, /* @__PURE__ */ new Set([id]));
41
+ } else {
42
+ allGroups.value.get(groupId)?.add(id);
43
+ }
44
+ }
45
+ });
46
+ onUnmounted(() => {
47
+ allItems.value.delete(id);
48
+ });
49
+ </script>
50
+
51
+ <template>
52
+ <ListboxItem
53
+ v-if="isRender"
54
+ v-bind="forwarded"
55
+ :id="id"
56
+ ref="itemRef"
57
+ data-slot="command-item"
58
+ :class="cn('data-highlighted:bg-zinc-100 data-highlighted:text-zinc-700 [&_svg:not([class*=\'text-\'])]:text-zinc-700 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\'size-\'])]:size-4', props.class)"
59
+ @select="() => {
60
+ filterState.search = '';
61
+ }"
62
+ >
63
+ <slot />
64
+ </ListboxItem>
65
+ </template>