@shwfed/nuxt 0.1.28 → 0.1.29

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 (186) hide show
  1. package/dist/module.d.mts +1 -1
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +1 -3
  4. package/dist/runtime/components/app.vue +0 -1
  5. package/dist/runtime/components/query.d.vue.ts +10 -0
  6. package/dist/runtime/components/query.vue +83 -0
  7. package/dist/runtime/components/query.vue.d.ts +10 -0
  8. package/dist/runtime/components/ui/calendar/Calendar.d.vue.ts +42 -0
  9. package/dist/runtime/components/ui/calendar/Calendar.vue +207 -0
  10. package/dist/runtime/components/ui/calendar/Calendar.vue.d.ts +42 -0
  11. package/dist/runtime/components/ui/calendar/CalendarCell.d.vue.ts +18 -0
  12. package/dist/runtime/components/ui/calendar/CalendarCell.vue +23 -0
  13. package/dist/runtime/components/ui/calendar/CalendarCell.vue.d.ts +18 -0
  14. package/dist/runtime/components/ui/calendar/CalendarCellTrigger.d.vue.ts +20 -0
  15. package/dist/runtime/components/ui/calendar/CalendarCellTrigger.vue +38 -0
  16. package/dist/runtime/components/ui/calendar/CalendarCellTrigger.vue.d.ts +20 -0
  17. package/dist/runtime/components/ui/calendar/CalendarGrid.d.vue.ts +18 -0
  18. package/dist/runtime/components/ui/calendar/CalendarGrid.vue +22 -0
  19. package/dist/runtime/components/ui/calendar/CalendarGrid.vue.d.ts +18 -0
  20. package/dist/runtime/components/ui/calendar/CalendarGridBody.d.vue.ts +14 -0
  21. package/dist/runtime/components/ui/calendar/CalendarGridBody.vue +16 -0
  22. package/dist/runtime/components/ui/calendar/CalendarGridBody.vue.d.ts +14 -0
  23. package/dist/runtime/components/ui/calendar/CalendarGridHead.d.vue.ts +18 -0
  24. package/dist/runtime/components/ui/calendar/CalendarGridHead.vue +17 -0
  25. package/dist/runtime/components/ui/calendar/CalendarGridHead.vue.d.ts +18 -0
  26. package/dist/runtime/components/ui/calendar/CalendarGridRow.d.vue.ts +18 -0
  27. package/dist/runtime/components/ui/calendar/CalendarGridRow.vue +22 -0
  28. package/dist/runtime/components/ui/calendar/CalendarGridRow.vue.d.ts +18 -0
  29. package/dist/runtime/components/ui/calendar/CalendarHeadCell.d.vue.ts +18 -0
  30. package/dist/runtime/components/ui/calendar/CalendarHeadCell.vue +22 -0
  31. package/dist/runtime/components/ui/calendar/CalendarHeadCell.vue.d.ts +18 -0
  32. package/dist/runtime/components/ui/calendar/CalendarHeader.d.vue.ts +18 -0
  33. package/dist/runtime/components/ui/calendar/CalendarHeader.vue +22 -0
  34. package/dist/runtime/components/ui/calendar/CalendarHeader.vue.d.ts +18 -0
  35. package/dist/runtime/components/ui/calendar/CalendarHeading.d.vue.ts +19 -0
  36. package/dist/runtime/components/ui/calendar/CalendarHeading.vue +27 -0
  37. package/dist/runtime/components/ui/calendar/CalendarHeading.vue.d.ts +19 -0
  38. package/dist/runtime/components/ui/calendar/CalendarNextButton.d.vue.ts +18 -0
  39. package/dist/runtime/components/ui/calendar/CalendarNextButton.vue +31 -0
  40. package/dist/runtime/components/ui/calendar/CalendarNextButton.vue.d.ts +18 -0
  41. package/dist/runtime/components/ui/calendar/CalendarPrevButton.d.vue.ts +18 -0
  42. package/dist/runtime/components/ui/calendar/CalendarPrevButton.vue +31 -0
  43. package/dist/runtime/components/ui/calendar/CalendarPrevButton.vue.d.ts +18 -0
  44. package/dist/runtime/components/ui/calendar/index.d.ts +13 -0
  45. package/dist/runtime/components/ui/calendar/index.js +12 -0
  46. package/dist/runtime/components/ui/command/CommandItem.vue +1 -1
  47. package/dist/runtime/components/ui/field/Field.d.vue.ts +19 -0
  48. package/dist/runtime/components/ui/field/Field.vue +22 -0
  49. package/dist/runtime/components/ui/field/Field.vue.d.ts +19 -0
  50. package/dist/runtime/components/ui/field/FieldContent.d.vue.ts +17 -0
  51. package/dist/runtime/components/ui/field/FieldContent.vue +18 -0
  52. package/dist/runtime/components/ui/field/FieldContent.vue.d.ts +17 -0
  53. package/dist/runtime/components/ui/field/FieldDescription.d.vue.ts +17 -0
  54. package/dist/runtime/components/ui/field/FieldDescription.vue +20 -0
  55. package/dist/runtime/components/ui/field/FieldDescription.vue.d.ts +17 -0
  56. package/dist/runtime/components/ui/field/FieldError.d.vue.ts +20 -0
  57. package/dist/runtime/components/ui/field/FieldError.vue +51 -0
  58. package/dist/runtime/components/ui/field/FieldError.vue.d.ts +20 -0
  59. package/dist/runtime/components/ui/field/FieldGroup.d.vue.ts +17 -0
  60. package/dist/runtime/components/ui/field/FieldGroup.vue +18 -0
  61. package/dist/runtime/components/ui/field/FieldGroup.vue.d.ts +17 -0
  62. package/dist/runtime/components/ui/field/FieldLabel.d.vue.ts +17 -0
  63. package/dist/runtime/components/ui/field/FieldLabel.vue +21 -0
  64. package/dist/runtime/components/ui/field/FieldLabel.vue.d.ts +17 -0
  65. package/dist/runtime/components/ui/field/FieldLegend.d.vue.ts +18 -0
  66. package/dist/runtime/components/ui/field/FieldLegend.vue +22 -0
  67. package/dist/runtime/components/ui/field/FieldLegend.vue.d.ts +18 -0
  68. package/dist/runtime/components/ui/field/FieldSeparator.d.vue.ts +17 -0
  69. package/dist/runtime/components/ui/field/FieldSeparator.vue +27 -0
  70. package/dist/runtime/components/ui/field/FieldSeparator.vue.d.ts +17 -0
  71. package/dist/runtime/components/ui/field/FieldSet.d.vue.ts +17 -0
  72. package/dist/runtime/components/ui/field/FieldSet.vue +19 -0
  73. package/dist/runtime/components/ui/field/FieldSet.vue.d.ts +17 -0
  74. package/dist/runtime/components/ui/field/FieldTitle.d.vue.ts +17 -0
  75. package/dist/runtime/components/ui/field/FieldTitle.vue +18 -0
  76. package/dist/runtime/components/ui/field/FieldTitle.vue.d.ts +17 -0
  77. package/dist/runtime/components/ui/field/index.d.ts +15 -0
  78. package/dist/runtime/components/ui/field/index.js +52 -0
  79. package/dist/runtime/components/ui/input/Input.d.vue.ts +13 -0
  80. package/dist/runtime/components/ui/input/Input.vue +27 -0
  81. package/dist/runtime/components/ui/input/Input.vue.d.ts +13 -0
  82. package/dist/runtime/components/ui/input/index.d.ts +1 -0
  83. package/dist/runtime/components/ui/input/index.js +1 -0
  84. package/dist/runtime/components/ui/input-group/InputCombobox.d.vue.ts +13 -0
  85. package/dist/runtime/components/ui/input-group/InputCombobox.vue +56 -0
  86. package/dist/runtime/components/ui/input-group/InputCombobox.vue.d.ts +13 -0
  87. package/dist/runtime/components/ui/input-group/InputComboboxInput.d.vue.ts +3 -0
  88. package/dist/runtime/components/ui/input-group/InputComboboxInput.vue +16 -0
  89. package/dist/runtime/components/ui/input-group/InputComboboxInput.vue.d.ts +3 -0
  90. package/dist/runtime/components/ui/input-group/InputGroup.d.vue.ts +17 -0
  91. package/dist/runtime/components/ui/input-group/InputGroup.vue +27 -0
  92. package/dist/runtime/components/ui/input-group/InputGroup.vue.d.ts +17 -0
  93. package/dist/runtime/components/ui/input-group/InputGroupAddon.d.vue.ts +21 -0
  94. package/dist/runtime/components/ui/input-group/InputGroupAddon.vue +30 -0
  95. package/dist/runtime/components/ui/input-group/InputGroupAddon.vue.d.ts +21 -0
  96. package/dist/runtime/components/ui/input-group/InputGroupButton.d.vue.ts +24 -0
  97. package/dist/runtime/components/ui/input-group/InputGroupButton.vue +20 -0
  98. package/dist/runtime/components/ui/input-group/InputGroupButton.vue.d.ts +24 -0
  99. package/dist/runtime/components/ui/input-group/InputGroupInput.d.vue.ts +7 -0
  100. package/dist/runtime/components/ui/input-group/InputGroupInput.vue +18 -0
  101. package/dist/runtime/components/ui/input-group/InputGroupInput.vue.d.ts +7 -0
  102. package/dist/runtime/components/ui/input-group/InputGroupText.d.vue.ts +17 -0
  103. package/dist/runtime/components/ui/input-group/InputGroupText.vue +17 -0
  104. package/dist/runtime/components/ui/input-group/InputGroupText.vue.d.ts +17 -0
  105. package/dist/runtime/components/ui/input-group/InputGroupTextarea.d.vue.ts +7 -0
  106. package/dist/runtime/components/ui/input-group/InputGroupTextarea.vue +17 -0
  107. package/dist/runtime/components/ui/input-group/InputGroupTextarea.vue.d.ts +7 -0
  108. package/dist/runtime/components/ui/input-group/index.d.ts +16 -0
  109. package/dist/runtime/components/ui/input-group/index.js +40 -0
  110. package/dist/runtime/components/ui/label/Label.d.vue.ts +18 -0
  111. package/dist/runtime/components/ui/label/Label.vue +27 -0
  112. package/dist/runtime/components/ui/label/Label.vue.d.ts +18 -0
  113. package/dist/runtime/components/ui/label/index.d.ts +1 -0
  114. package/dist/runtime/components/ui/label/index.js +1 -0
  115. package/dist/runtime/components/ui/native-select/NativeSelect.d.vue.ts +23 -0
  116. package/dist/runtime/components/ui/native-select/NativeSelect.vue +45 -0
  117. package/dist/runtime/components/ui/native-select/NativeSelect.vue.d.ts +23 -0
  118. package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.d.vue.ts +17 -0
  119. package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.vue +15 -0
  120. package/dist/runtime/components/ui/native-select/NativeSelectOptGroup.vue.d.ts +17 -0
  121. package/dist/runtime/components/ui/native-select/NativeSelectOption.d.vue.ts +17 -0
  122. package/dist/runtime/components/ui/native-select/NativeSelectOption.vue +15 -0
  123. package/dist/runtime/components/ui/native-select/NativeSelectOption.vue.d.ts +17 -0
  124. package/dist/runtime/components/ui/native-select/index.d.ts +3 -0
  125. package/dist/runtime/components/ui/native-select/index.js +3 -0
  126. package/dist/runtime/components/ui/popover/Popover.d.vue.ts +21 -0
  127. package/dist/runtime/components/ui/popover/Popover.vue +20 -0
  128. package/dist/runtime/components/ui/popover/Popover.vue.d.ts +21 -0
  129. package/dist/runtime/components/ui/popover/PopoverAnchor.d.vue.ts +14 -0
  130. package/dist/runtime/components/ui/popover/PopoverAnchor.vue +17 -0
  131. package/dist/runtime/components/ui/popover/PopoverAnchor.vue.d.ts +14 -0
  132. package/dist/runtime/components/ui/popover/PopoverContent.d.vue.ts +35 -0
  133. package/dist/runtime/components/ui/popover/PopoverContent.vue +57 -0
  134. package/dist/runtime/components/ui/popover/PopoverContent.vue.d.ts +35 -0
  135. package/dist/runtime/components/ui/popover/PopoverTrigger.d.vue.ts +14 -0
  136. package/dist/runtime/components/ui/popover/PopoverTrigger.vue +16 -0
  137. package/dist/runtime/components/ui/popover/PopoverTrigger.vue.d.ts +14 -0
  138. package/dist/runtime/components/ui/popover/index.d.ts +4 -0
  139. package/dist/runtime/components/ui/popover/index.js +4 -0
  140. package/dist/runtime/components/ui/range-calendar/RangeCalendar.d.vue.ts +18 -0
  141. package/dist/runtime/components/ui/range-calendar/RangeCalendar.vue +95 -0
  142. package/dist/runtime/components/ui/range-calendar/RangeCalendar.vue.d.ts +18 -0
  143. package/dist/runtime/components/ui/range-calendar/RangeCalendarCell.d.vue.ts +18 -0
  144. package/dist/runtime/components/ui/range-calendar/RangeCalendarCell.vue +23 -0
  145. package/dist/runtime/components/ui/range-calendar/RangeCalendarCell.vue.d.ts +18 -0
  146. package/dist/runtime/components/ui/range-calendar/RangeCalendarCellTrigger.d.vue.ts +20 -0
  147. package/dist/runtime/components/ui/range-calendar/RangeCalendarCellTrigger.vue +40 -0
  148. package/dist/runtime/components/ui/range-calendar/RangeCalendarCellTrigger.vue.d.ts +20 -0
  149. package/dist/runtime/components/ui/range-calendar/RangeCalendarGrid.d.vue.ts +18 -0
  150. package/dist/runtime/components/ui/range-calendar/RangeCalendarGrid.vue +22 -0
  151. package/dist/runtime/components/ui/range-calendar/RangeCalendarGrid.vue.d.ts +18 -0
  152. package/dist/runtime/components/ui/range-calendar/RangeCalendarGridBody.d.vue.ts +14 -0
  153. package/dist/runtime/components/ui/range-calendar/RangeCalendarGridBody.vue +16 -0
  154. package/dist/runtime/components/ui/range-calendar/RangeCalendarGridBody.vue.d.ts +14 -0
  155. package/dist/runtime/components/ui/range-calendar/RangeCalendarGridHead.d.vue.ts +14 -0
  156. package/dist/runtime/components/ui/range-calendar/RangeCalendarGridHead.vue +16 -0
  157. package/dist/runtime/components/ui/range-calendar/RangeCalendarGridHead.vue.d.ts +14 -0
  158. package/dist/runtime/components/ui/range-calendar/RangeCalendarGridRow.d.vue.ts +18 -0
  159. package/dist/runtime/components/ui/range-calendar/RangeCalendarGridRow.vue +22 -0
  160. package/dist/runtime/components/ui/range-calendar/RangeCalendarGridRow.vue.d.ts +18 -0
  161. package/dist/runtime/components/ui/range-calendar/RangeCalendarHeadCell.d.vue.ts +18 -0
  162. package/dist/runtime/components/ui/range-calendar/RangeCalendarHeadCell.vue +22 -0
  163. package/dist/runtime/components/ui/range-calendar/RangeCalendarHeadCell.vue.d.ts +18 -0
  164. package/dist/runtime/components/ui/range-calendar/RangeCalendarHeader.d.vue.ts +18 -0
  165. package/dist/runtime/components/ui/range-calendar/RangeCalendarHeader.vue +22 -0
  166. package/dist/runtime/components/ui/range-calendar/RangeCalendarHeader.vue.d.ts +18 -0
  167. package/dist/runtime/components/ui/range-calendar/RangeCalendarHeading.d.vue.ts +19 -0
  168. package/dist/runtime/components/ui/range-calendar/RangeCalendarHeading.vue +26 -0
  169. package/dist/runtime/components/ui/range-calendar/RangeCalendarHeading.vue.d.ts +19 -0
  170. package/dist/runtime/components/ui/range-calendar/RangeCalendarNextButton.d.vue.ts +18 -0
  171. package/dist/runtime/components/ui/range-calendar/RangeCalendarNextButton.vue +32 -0
  172. package/dist/runtime/components/ui/range-calendar/RangeCalendarNextButton.vue.d.ts +18 -0
  173. package/dist/runtime/components/ui/range-calendar/RangeCalendarPrevButton.d.vue.ts +18 -0
  174. package/dist/runtime/components/ui/range-calendar/RangeCalendarPrevButton.vue +32 -0
  175. package/dist/runtime/components/ui/range-calendar/RangeCalendarPrevButton.vue.d.ts +18 -0
  176. package/dist/runtime/components/ui/range-calendar/index.d.ts +12 -0
  177. package/dist/runtime/components/ui/range-calendar/index.js +12 -0
  178. package/dist/runtime/components/ui/textarea/Textarea.d.vue.ts +13 -0
  179. package/dist/runtime/components/ui/textarea/Textarea.vue +22 -0
  180. package/dist/runtime/components/ui/textarea/Textarea.vue.d.ts +13 -0
  181. package/dist/runtime/components/ui/textarea/index.d.ts +1 -0
  182. package/dist/runtime/components/ui/textarea/index.js +1 -0
  183. package/dist/runtime/components/ui/tooltip/TooltipContent.vue +1 -1
  184. package/dist/runtime/plugins/cel/env.d.ts +2 -2
  185. package/dist/runtime/plugins/cel/env.js +5 -7
  186. package/package.json +1 -1
package/dist/module.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
 
3
3
  interface ModuleOptions {
4
- features: ReadonlyArray<string>;
4
+ _?: never;
5
5
  }
6
6
  declare module 'nuxt/schema' {
7
7
  interface PublicRuntimeConfig {
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
3
  "configKey": "shwfed",
4
- "version": "0.1.28",
4
+ "version": "0.1.29",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -6,9 +6,7 @@ const module$1 = defineNuxtModule({
6
6
  name: "@shwfed/nuxt",
7
7
  configKey: "shwfed"
8
8
  },
9
- defaults: {
10
- features: []
11
- },
9
+ defaults: {},
12
10
  setup(options, nuxt) {
13
11
  const resolver = createResolver(import.meta.url);
14
12
  nuxt.options.runtimeConfig.public.shwfed = options;
@@ -34,7 +34,6 @@ whenever(() => meta_k?.value, () => {
34
34
  <ClientOnly>
35
35
  <Toaster />
36
36
  <CommandDialog
37
- v-if="$dsl.evaluate`feature('command-palette')`()"
38
37
  v-model:open="isCommandOpen"
39
38
  >
40
39
  <CommandInput />
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ fields: ReadonlyArray<{
3
+ label: string;
4
+ prop: string;
5
+ initial?: string;
6
+ }>;
7
+ };
8
+ 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>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,83 @@
1
+ <script setup>
2
+ import { Icon } from "@iconify/vue";
3
+ import { Field, FieldLabel } from "./ui/field";
4
+ import { InputGroup, InputGroupAddon, InputGroupButton, InputCombobox } from "./ui/input-group";
5
+ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/tooltip";
6
+ import { useI18n } from "vue-i18n";
7
+ import { CommandItem, CommandGroup } from "./ui/command";
8
+ const { t } = useI18n();
9
+ defineProps({
10
+ fields: { type: Array, required: true }
11
+ });
12
+ </script>
13
+
14
+ <template>
15
+ <div
16
+ class="mx-auto"
17
+ style="width: 400px;"
18
+ >
19
+ <Field>
20
+ <InputGroup>
21
+ <InputCombobox>
22
+ <CommandGroup heading="Search">
23
+ <CommandItem
24
+ value="1"
25
+ >
26
+ <Icon
27
+ icon="fluent:search-20-filled"
28
+ />
29
+ <span>
30
+ Search
31
+ </span>
32
+ </CommandItem>
33
+ <CommandItem
34
+ value="2"
35
+ >
36
+ <Icon
37
+ icon="fluent:bookmark-20-filled"
38
+ />
39
+ <span>
40
+ Bookmark
41
+ </span>
42
+ </CommandItem>
43
+ </CommandGroup>
44
+ </InputCombobox>
45
+ <InputGroupAddon
46
+ align="inline-end"
47
+ >
48
+ <Tooltip :delay-duration="800">
49
+ <TooltipProvider>
50
+ <TooltipTrigger as-child>
51
+ <InputGroupButton>
52
+ <Icon
53
+ icon="fluent:dismiss-20-regular"
54
+ />
55
+ </InputGroupButton>
56
+ </TooltipTrigger>
57
+ <TooltipContent>
58
+ {{ t("clear") }}
59
+ </TooltipContent>
60
+ </TooltipProvider>
61
+ </Tooltip>
62
+ </InputGroupAddon>
63
+ </InputGroup>
64
+ <FieldLabel>
65
+ Query
66
+ </FieldLabel>
67
+ </Field>
68
+ </div>
69
+ </template>
70
+
71
+ <i18n lang="json">
72
+ {
73
+ "zh": {
74
+ "clear": "清空"
75
+ },
76
+ "ja": {
77
+ "clear": "クリア"
78
+ },
79
+ "en": {
80
+ "clear": "Clear"
81
+ }
82
+ }
83
+ </i18n>
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ fields: ReadonlyArray<{
3
+ label: string;
4
+ prop: string;
5
+ initial?: string;
6
+ }>;
7
+ };
8
+ 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>;
9
+ declare const _default: typeof __VLS_export;
10
+ export default _default;
@@ -0,0 +1,42 @@
1
+ import type { CalendarRootProps, DateValue } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ import type { LayoutTypes } from '.';
4
+ type __VLS_Props = CalendarRootProps & {
5
+ class?: HTMLAttributes['class'];
6
+ layout?: LayoutTypes;
7
+ yearRange?: DateValue[];
8
+ };
9
+ declare var __VLS_59: {}, __VLS_67: {}, __VLS_69: {
10
+ date: DateValue;
11
+ month: import("@vueuse/core").ReuseTemplateComponent<{
12
+ date: DateValue;
13
+ }, Record<"default", undefined>>;
14
+ year: import("@vueuse/core").ReuseTemplateComponent<{
15
+ date: DateValue;
16
+ }, Record<"default", undefined>>;
17
+ };
18
+ type __VLS_Slots = {} & {
19
+ 'calendar-prev-icon'?: (props: typeof __VLS_59) => any;
20
+ } & {
21
+ 'calendar-next-icon'?: (props: typeof __VLS_67) => any;
22
+ } & {
23
+ 'calendar-heading'?: (props: typeof __VLS_69) => any;
24
+ };
25
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
+ "update:modelValue": (date: DateValue | undefined) => any;
27
+ "update:placeholder": (date: DateValue) => any;
28
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
29
+ "onUpdate:modelValue"?: ((date: DateValue | undefined) => any) | undefined;
30
+ "onUpdate:placeholder"?: ((date: DateValue) => any) | undefined;
31
+ }>, {
32
+ modelValue: DateValue | DateValue[];
33
+ layout: "month-and-year" | "month-only" | "year-only";
34
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
36
+ declare const _default: typeof __VLS_export;
37
+ export default _default;
38
+ type __VLS_WithSlots<T, S> = T & {
39
+ new (): {
40
+ $slots: S;
41
+ };
42
+ };
@@ -0,0 +1,207 @@
1
+ <script setup>
2
+ import { getLocalTimeZone, today } from "@internationalized/date";
3
+ import { createReusableTemplate, reactiveOmit, useNavigatorLanguage, useVModel } from "@vueuse/core";
4
+ import { CalendarRoot, useDateFormatter, useForwardPropsEmits } from "reka-ui";
5
+ import { createYear, createYearRange, toDate } from "reka-ui/date";
6
+ import { computed, toRaw } from "vue";
7
+ import { cn } from "../../../utils/cn";
8
+ import { NativeSelect, NativeSelectOption } from "../native-select";
9
+ import { CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton } from ".";
10
+ const props = defineProps({
11
+ defaultValue: { type: null, required: false },
12
+ defaultPlaceholder: { type: null, required: false },
13
+ placeholder: { type: null, required: false },
14
+ pagedNavigation: { type: Boolean, required: false },
15
+ preventDeselect: { type: Boolean, required: false },
16
+ weekStartsOn: { type: Number, required: false },
17
+ weekdayFormat: { type: String, required: false },
18
+ calendarLabel: { type: String, required: false },
19
+ fixedWeeks: { type: Boolean, required: false },
20
+ maxValue: { type: null, required: false },
21
+ minValue: { type: null, required: false },
22
+ locale: { type: String, required: false },
23
+ numberOfMonths: { type: Number, required: false },
24
+ disabled: { type: Boolean, required: false },
25
+ readonly: { type: Boolean, required: false },
26
+ initialFocus: { type: Boolean, required: false },
27
+ isDateDisabled: { type: Function, required: false },
28
+ isDateUnavailable: { type: Function, required: false },
29
+ dir: { type: String, required: false },
30
+ nextPage: { type: Function, required: false },
31
+ prevPage: { type: Function, required: false },
32
+ modelValue: { type: null, required: false, default: void 0 },
33
+ multiple: { type: Boolean, required: false },
34
+ disableDaysOutsideCurrentView: { type: Boolean, required: false },
35
+ asChild: { type: Boolean, required: false },
36
+ as: { type: null, required: false },
37
+ class: { type: null, required: false },
38
+ layout: { type: null, required: false, default: void 0 },
39
+ yearRange: { type: Array, required: false }
40
+ });
41
+ const emits = defineEmits(["update:modelValue", "update:placeholder"]);
42
+ const delegatedProps = reactiveOmit(props, "class", "layout", "placeholder");
43
+ const placeholder = useVModel(props, "placeholder", emits, {
44
+ passive: true,
45
+ defaultValue: props.defaultPlaceholder ?? today(getLocalTimeZone())
46
+ });
47
+ const formatter = useDateFormatter(props.locale ?? "en");
48
+ const yearRange = computed(() => {
49
+ return props.yearRange ?? createYearRange({
50
+ start: props?.minValue ?? (toRaw(props.placeholder) ?? props.defaultPlaceholder ?? today(getLocalTimeZone())).cycle("year", -100),
51
+ end: props?.maxValue ?? (toRaw(props.placeholder) ?? props.defaultPlaceholder ?? today(getLocalTimeZone())).cycle("year", 10)
52
+ });
53
+ });
54
+ const [DefineMonthTemplate, ReuseMonthTemplate] = createReusableTemplate();
55
+ const [DefineYearTemplate, ReuseYearTemplate] = createReusableTemplate();
56
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
57
+ const locale = useNavigatorLanguage();
58
+ const weekStartsOn = computed(() => {
59
+ if (!locale.isSupported || !locale.language.value) return void 0;
60
+ const intl = new Intl.Locale(locale.language.value);
61
+ if ("getWeekInfo" in intl && typeof intl.getWeekInfo === "function") {
62
+ return intl.getWeekInfo().firstDay;
63
+ }
64
+ return void 0;
65
+ });
66
+ </script>
67
+
68
+ <template>
69
+ <DefineMonthTemplate v-slot="{ date }">
70
+ <div class="**:data-[slot=native-select-icon]:right-1">
71
+ <div class="relative">
72
+ <div class="absolute inset-0 flex h-full items-center text-sm pl-2 pointer-events-none">
73
+ {{ formatter.custom(toDate(date), { month: "short" }) }}
74
+ </div>
75
+ <NativeSelect
76
+ class="text-xs h-8 pr-6 pl-2 text-transparent relative"
77
+ @change="(e) => {
78
+ placeholder = placeholder.set({
79
+ month: Number(e?.target?.value)
80
+ });
81
+ }"
82
+ >
83
+ <NativeSelectOption
84
+ v-for="(month) in createYear({ dateObj: date })"
85
+ :key="month.toString()"
86
+ :value="month.month"
87
+ :selected="date.month === month.month"
88
+ >
89
+ {{ formatter.custom(toDate(month), { month: "short" }) }}
90
+ </NativeSelectOption>
91
+ </NativeSelect>
92
+ </div>
93
+ </div>
94
+ </DefineMonthTemplate>
95
+
96
+ <DefineYearTemplate v-slot="{ date }">
97
+ <div class="**:data-[slot=native-select-icon]:right-1">
98
+ <div class="relative">
99
+ <div class="absolute inset-0 flex h-full items-center text-sm pl-2 pointer-events-none">
100
+ {{ formatter.custom(toDate(date), { year: "numeric" }) }}
101
+ </div>
102
+ <NativeSelect
103
+ class="text-xs h-8 pr-6 pl-2 text-transparent relative"
104
+ @change="(e) => {
105
+ placeholder = placeholder.set({
106
+ year: Number(e?.target?.value)
107
+ });
108
+ }"
109
+ >
110
+ <NativeSelectOption
111
+ v-for="(year) in yearRange"
112
+ :key="year.toString()"
113
+ :value="year.year"
114
+ :selected="date.year === year.year"
115
+ >
116
+ {{ formatter.custom(toDate(year), { year: "numeric" }) }}
117
+ </NativeSelectOption>
118
+ </NativeSelect>
119
+ </div>
120
+ </div>
121
+ </DefineYearTemplate>
122
+
123
+ <CalendarRoot
124
+ v-slot="{ grid, weekDays, date }"
125
+ v-bind="forwarded"
126
+ v-model:placeholder="placeholder"
127
+ data-slot="calendar"
128
+ :week-starts-on="weekStartsOn"
129
+ :class="cn('p-3', props.class)"
130
+ >
131
+ <CalendarHeader class="pt-0">
132
+ <nav class="w-full flex items-center gap-1 absolute top-1/2 -translate-y-1/2 transform-gpu inset-x-0 justify-between">
133
+ <CalendarPrevButton>
134
+ <slot name="calendar-prev-icon" />
135
+ </CalendarPrevButton>
136
+ <CalendarNextButton>
137
+ <slot name="calendar-next-icon" />
138
+ </CalendarNextButton>
139
+ </nav>
140
+
141
+ <slot
142
+ name="calendar-heading"
143
+ :date="date"
144
+ :month="ReuseMonthTemplate"
145
+ :year="ReuseYearTemplate"
146
+ >
147
+ <template v-if="layout === 'month-and-year'">
148
+ <div class="flex items-center justify-center gap-1">
149
+ <ReuseMonthTemplate :date="date" />
150
+ <ReuseYearTemplate :date="date" />
151
+ </div>
152
+ </template>
153
+ <template v-else-if="layout === 'month-only'">
154
+ <div class="flex items-center justify-center gap-1">
155
+ <ReuseMonthTemplate :date="date" />
156
+ {{ formatter.custom(toDate(date), { year: "numeric" }) }}
157
+ </div>
158
+ </template>
159
+ <template v-else-if="layout === 'year-only'">
160
+ <div class="flex items-center justify-center gap-1">
161
+ {{ formatter.custom(toDate(date), { month: "short" }) }}
162
+ <ReuseYearTemplate :date="date" />
163
+ </div>
164
+ </template>
165
+ <template v-else>
166
+ <CalendarHeading />
167
+ </template>
168
+ </slot>
169
+ </CalendarHeader>
170
+
171
+ <div class="flex flex-col gap-y-4 mt-4 sm:flex-row sm:gap-x-4 sm:gap-y-0">
172
+ <CalendarGrid
173
+ v-for="month in grid"
174
+ :key="month.value.toString()"
175
+ >
176
+ <CalendarGridHead>
177
+ <CalendarGridRow>
178
+ <CalendarHeadCell
179
+ v-for="day in weekDays"
180
+ :key="day"
181
+ >
182
+ {{ day }}
183
+ </CalendarHeadCell>
184
+ </CalendarGridRow>
185
+ </CalendarGridHead>
186
+ <CalendarGridBody>
187
+ <CalendarGridRow
188
+ v-for="(weekDates, index) in month.rows"
189
+ :key="`weekDate-${index}`"
190
+ class="mt-2 w-full"
191
+ >
192
+ <CalendarCell
193
+ v-for="weekDate in weekDates"
194
+ :key="weekDate.toString()"
195
+ :date="weekDate"
196
+ >
197
+ <CalendarCellTrigger
198
+ :day="weekDate"
199
+ :month="month.value"
200
+ />
201
+ </CalendarCell>
202
+ </CalendarGridRow>
203
+ </CalendarGridBody>
204
+ </CalendarGrid>
205
+ </div>
206
+ </CalendarRoot>
207
+ </template>
@@ -0,0 +1,42 @@
1
+ import type { CalendarRootProps, DateValue } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ import type { LayoutTypes } from '.';
4
+ type __VLS_Props = CalendarRootProps & {
5
+ class?: HTMLAttributes['class'];
6
+ layout?: LayoutTypes;
7
+ yearRange?: DateValue[];
8
+ };
9
+ declare var __VLS_59: {}, __VLS_67: {}, __VLS_69: {
10
+ date: DateValue;
11
+ month: import("@vueuse/core").ReuseTemplateComponent<{
12
+ date: DateValue;
13
+ }, Record<"default", undefined>>;
14
+ year: import("@vueuse/core").ReuseTemplateComponent<{
15
+ date: DateValue;
16
+ }, Record<"default", undefined>>;
17
+ };
18
+ type __VLS_Slots = {} & {
19
+ 'calendar-prev-icon'?: (props: typeof __VLS_59) => any;
20
+ } & {
21
+ 'calendar-next-icon'?: (props: typeof __VLS_67) => any;
22
+ } & {
23
+ 'calendar-heading'?: (props: typeof __VLS_69) => any;
24
+ };
25
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
+ "update:modelValue": (date: DateValue | undefined) => any;
27
+ "update:placeholder": (date: DateValue) => any;
28
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
29
+ "onUpdate:modelValue"?: ((date: DateValue | undefined) => any) | undefined;
30
+ "onUpdate:placeholder"?: ((date: DateValue) => any) | undefined;
31
+ }>, {
32
+ modelValue: DateValue | DateValue[];
33
+ layout: "month-and-year" | "month-only" | "year-only";
34
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
36
+ declare const _default: typeof __VLS_export;
37
+ export default _default;
38
+ type __VLS_WithSlots<T, S> = T & {
39
+ new (): {
40
+ $slots: S;
41
+ };
42
+ };
@@ -0,0 +1,18 @@
1
+ import type { CalendarCellProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = CalendarCellProps & {
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,23 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { CalendarCell, useForwardProps } from "reka-ui";
4
+ import { cn } from "../../../utils/cn";
5
+ const props = defineProps({
6
+ date: { type: null, required: true },
7
+ asChild: { type: Boolean, required: false },
8
+ as: { type: null, required: false },
9
+ class: { type: null, required: false }
10
+ });
11
+ const delegatedProps = reactiveOmit(props, "class");
12
+ const forwardedProps = useForwardProps(delegatedProps);
13
+ </script>
14
+
15
+ <template>
16
+ <CalendarCell
17
+ data-slot="calendar-cell"
18
+ :class="cn('relative p-0 text-center text-sm focus-within:relative focus-within:z-20 flex-1', props.class)"
19
+ v-bind="forwardedProps"
20
+ >
21
+ <slot />
22
+ </CalendarCell>
23
+ </template>
@@ -0,0 +1,18 @@
1
+ import type { CalendarCellProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = CalendarCellProps & {
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,20 @@
1
+ import type { CalendarCellTriggerProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = CalendarCellTriggerProps & {
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<{}>, {
11
+ as: import("reka-ui").AsTag | import("vue").Component;
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1,38 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { CalendarCellTrigger, useForwardProps } from "reka-ui";
4
+ import { cn } from "../../../utils/cn";
5
+ import { buttonVariants } from "../button";
6
+ const props = defineProps({
7
+ day: { type: null, required: true },
8
+ month: { type: null, required: true },
9
+ asChild: { type: Boolean, required: false },
10
+ as: { type: null, required: false, default: "button" },
11
+ class: { type: null, required: false }
12
+ });
13
+ const delegatedProps = reactiveOmit(props, "class");
14
+ const forwardedProps = useForwardProps(delegatedProps);
15
+ </script>
16
+
17
+ <template>
18
+ <CalendarCellTrigger
19
+ data-slot="calendar-cell-trigger"
20
+ :class="cn(
21
+ buttonVariants({ variant: 'ghost' }),
22
+ 'size-8 rounded-full p-0 font-normal transition-all duration-180 aria-selected:opacity-100 cursor-pointer',
23
+ '[&[data-today]:not([data-selected])]:text-white [&[data-today]:not([data-selected])]:bg-red-400',
24
+ // Selected
25
+ 'data-selected:bg-[color-mix(in_srgb,var(--primary)_20%,white)] data-selected:opacity-100 data-selected:text-(--primary)',
26
+ // Disabled
27
+ 'data-disabled:text-zinc-500 data-disabled:opacity-50',
28
+ // Unavailable
29
+ 'data-unavailable:text-zinc-300 data-unavailable:line-through',
30
+ // Outside months
31
+ 'data-outside-view:text-zinc-300',
32
+ props.class
33
+ )"
34
+ v-bind="forwardedProps"
35
+ >
36
+ <slot />
37
+ </CalendarCellTrigger>
38
+ </template>
@@ -0,0 +1,20 @@
1
+ import type { CalendarCellTriggerProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = CalendarCellTriggerProps & {
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<{}>, {
11
+ as: import("reka-ui").AsTag | import("vue").Component;
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1,18 @@
1
+ import type { CalendarGridProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = CalendarGridProps & {
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,22 @@
1
+ <script setup>
2
+ import { reactiveOmit } from "@vueuse/core";
3
+ import { CalendarGrid, useForwardProps } from "reka-ui";
4
+ import { cn } from "../../../utils/cn";
5
+ const props = defineProps({
6
+ asChild: { type: Boolean, required: false },
7
+ as: { type: null, required: false },
8
+ class: { type: null, required: false }
9
+ });
10
+ const delegatedProps = reactiveOmit(props, "class");
11
+ const forwardedProps = useForwardProps(delegatedProps);
12
+ </script>
13
+
14
+ <template>
15
+ <CalendarGrid
16
+ data-slot="calendar-grid"
17
+ :class="cn('w-full border-collapse space-x-1', props.class)"
18
+ v-bind="forwardedProps"
19
+ >
20
+ <slot />
21
+ </CalendarGrid>
22
+ </template>
@@ -0,0 +1,18 @@
1
+ import type { CalendarGridProps } from 'reka-ui';
2
+ import type { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = CalendarGridProps & {
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,14 @@
1
+ import type { CalendarGridBodyProps } from 'reka-ui';
2
+ declare var __VLS_8: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_8) => any;
5
+ };
6
+ declare const __VLS_base: import("vue").DefineComponent<CalendarGridBodyProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CalendarGridBodyProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
10
+ type __VLS_WithSlots<T, S> = T & {
11
+ new (): {
12
+ $slots: S;
13
+ };
14
+ };