@sytechui/calendar 2.2.32

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 (91) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +24 -0
  3. package/dist/calendar-base.d.mts +23 -0
  4. package/dist/calendar-base.d.ts +23 -0
  5. package/dist/calendar-base.js +604 -0
  6. package/dist/calendar-base.mjs +17 -0
  7. package/dist/calendar-cell.d.mts +18 -0
  8. package/dist/calendar-cell.d.ts +18 -0
  9. package/dist/calendar-cell.js +97 -0
  10. package/dist/calendar-cell.mjs +7 -0
  11. package/dist/calendar-context.d.mts +19 -0
  12. package/dist/calendar-context.d.ts +19 -0
  13. package/dist/calendar-context.js +38 -0
  14. package/dist/calendar-context.mjs +9 -0
  15. package/dist/calendar-header.d.mts +14 -0
  16. package/dist/calendar-header.d.ts +14 -0
  17. package/dist/calendar-header.js +156 -0
  18. package/dist/calendar-header.mjs +10 -0
  19. package/dist/calendar-month.d.mts +13 -0
  20. package/dist/calendar-month.d.ts +13 -0
  21. package/dist/calendar-month.js +226 -0
  22. package/dist/calendar-month.mjs +10 -0
  23. package/dist/calendar-picker.d.mts +12 -0
  24. package/dist/calendar-picker.d.ts +12 -0
  25. package/dist/calendar-picker.js +83 -0
  26. package/dist/calendar-picker.mjs +9 -0
  27. package/dist/calendar-transitions.d.mts +10 -0
  28. package/dist/calendar-transitions.d.ts +10 -0
  29. package/dist/calendar-transitions.js +48 -0
  30. package/dist/calendar-transitions.mjs +9 -0
  31. package/dist/calendar.d.mts +24 -0
  32. package/dist/calendar.d.ts +24 -0
  33. package/dist/calendar.js +876 -0
  34. package/dist/calendar.mjs +20 -0
  35. package/dist/chevron-down.d.mts +6 -0
  36. package/dist/chevron-down.d.ts +6 -0
  37. package/dist/chevron-down.js +54 -0
  38. package/dist/chevron-down.mjs +7 -0
  39. package/dist/chevron-left.d.mts +6 -0
  40. package/dist/chevron-left.d.ts +6 -0
  41. package/dist/chevron-left.js +54 -0
  42. package/dist/chevron-left.mjs +7 -0
  43. package/dist/chevron-right.d.mts +6 -0
  44. package/dist/chevron-right.d.ts +6 -0
  45. package/dist/chevron-right.js +54 -0
  46. package/dist/chevron-right.mjs +7 -0
  47. package/dist/chunk-5CY7DCRB.mjs +24 -0
  48. package/dist/chunk-AJXW2JXW.mjs +23 -0
  49. package/dist/chunk-BEC3B3UO.mjs +23 -0
  50. package/dist/chunk-CPBF6DM2.mjs +120 -0
  51. package/dist/chunk-DN6I5LXB.mjs +125 -0
  52. package/dist/chunk-H34OUI62.mjs +157 -0
  53. package/dist/chunk-HUKPVIZ5.mjs +31 -0
  54. package/dist/chunk-IDU5RSFL.mjs +93 -0
  55. package/dist/chunk-IFK7FCNU.mjs +42 -0
  56. package/dist/chunk-JJRY4BYN.mjs +31 -0
  57. package/dist/chunk-JQFIYCMS.mjs +19 -0
  58. package/dist/chunk-MCZLP73P.mjs +14 -0
  59. package/dist/chunk-MDGP3JHC.mjs +74 -0
  60. package/dist/chunk-MUYVZHWM.mjs +31 -0
  61. package/dist/chunk-OEB7VI2R.mjs +125 -0
  62. package/dist/chunk-ZJZG3P2K.mjs +181 -0
  63. package/dist/index.d.mts +21 -0
  64. package/dist/index.d.ts +21 -0
  65. package/dist/index.js +1020 -0
  66. package/dist/index.mjs +36 -0
  67. package/dist/range-calendar.d.mts +24 -0
  68. package/dist/range-calendar.d.ts +24 -0
  69. package/dist/range-calendar.js +876 -0
  70. package/dist/range-calendar.mjs +20 -0
  71. package/dist/use-calendar-base.d.mts +1224 -0
  72. package/dist/use-calendar-base.d.ts +1224 -0
  73. package/dist/use-calendar-base.js +174 -0
  74. package/dist/use-calendar-base.mjs +7 -0
  75. package/dist/use-calendar-picker.d.mts +482 -0
  76. package/dist/use-calendar-picker.d.ts +482 -0
  77. package/dist/use-calendar-picker.js +49 -0
  78. package/dist/use-calendar-picker.mjs +8 -0
  79. package/dist/use-calendar.d.mts +494 -0
  80. package/dist/use-calendar.d.ts +494 -0
  81. package/dist/use-calendar.js +293 -0
  82. package/dist/use-calendar.mjs +8 -0
  83. package/dist/use-range-calendar.d.mts +498 -0
  84. package/dist/use-range-calendar.d.ts +498 -0
  85. package/dist/use-range-calendar.js +293 -0
  86. package/dist/use-range-calendar.mjs +8 -0
  87. package/dist/utils.d.mts +7 -0
  88. package/dist/utils.d.ts +7 -0
  89. package/dist/utils.js +59 -0
  90. package/dist/utils.mjs +33 -0
  91. package/package.json +74 -0
@@ -0,0 +1,12 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { CalendarPickerProps } from './use-calendar-picker.js';
3
+ import '@sytechui/theme';
4
+ import 'tailwind-variants';
5
+ import '@react-types/calendar';
6
+ import '@react-stately/calendar';
7
+ import '@internationalized/date';
8
+ import '@sytechui/system';
9
+
10
+ declare function CalendarPicker(props: CalendarPickerProps): react_jsx_runtime.JSX.Element;
11
+
12
+ export { CalendarPicker };
@@ -0,0 +1,83 @@
1
+ "use client";
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/calendar-picker.tsx
22
+ var calendar_picker_exports = {};
23
+ __export(calendar_picker_exports, {
24
+ CalendarPicker: () => CalendarPicker
25
+ });
26
+ module.exports = __toCommonJS(calendar_picker_exports);
27
+ var import_time_picker = require("@sytechui/time-picker");
28
+
29
+ // src/calendar-context.ts
30
+ var import_react_utils = require("@sytechui/react-utils");
31
+ var [CalendarProvider, useCalendarContext] = (0, import_react_utils.createContext)({
32
+ name: "CalendarContext",
33
+ strict: true,
34
+ errorMessage: "useContext: `context` is undefined. Seems you forgot to wrap component within the CalendarProvider"
35
+ });
36
+
37
+ // src/use-calendar-picker.ts
38
+ function useCalendarPicker(_props) {
39
+ const { slots, state, isHeaderExpanded, classNames } = useCalendarContext();
40
+ return {
41
+ state,
42
+ slots,
43
+ classNames,
44
+ isHeaderExpanded
45
+ };
46
+ }
47
+
48
+ // src/calendar-picker.tsx
49
+ var import_jsx_runtime = require("react/jsx-runtime");
50
+ function CalendarPicker(props) {
51
+ const { state, slots, classNames, isHeaderExpanded } = useCalendarPicker(props);
52
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
53
+ "div",
54
+ {
55
+ className: slots == null ? void 0 : slots.pickerWrapper({
56
+ class: classNames == null ? void 0 : classNames.pickerWrapper
57
+ }),
58
+ "data-slot": "picker-wrapper",
59
+ inert: !isHeaderExpanded ? true : void 0,
60
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
61
+ import_time_picker.TimePicker,
62
+ {
63
+ isMonth: true,
64
+ isYear: true,
65
+ isDay: false,
66
+ value: state.focusedDate,
67
+ onChange: (date) => {
68
+ state.setFocusedDate(
69
+ state.focusedDate.set({
70
+ year: date.year,
71
+ month: date.month
72
+ })
73
+ );
74
+ }
75
+ }
76
+ )
77
+ }
78
+ );
79
+ }
80
+ // Annotate the CommonJS export names for ESM import in node:
81
+ 0 && (module.exports = {
82
+ CalendarPicker
83
+ });
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import {
3
+ CalendarPicker
4
+ } from "./chunk-IFK7FCNU.mjs";
5
+ import "./chunk-JQFIYCMS.mjs";
6
+ import "./chunk-MCZLP73P.mjs";
7
+ export {
8
+ CalendarPicker
9
+ };
@@ -0,0 +1,10 @@
1
+ import { Variants } from 'framer-motion';
2
+
3
+ declare const transition: {
4
+ type: string;
5
+ bounce: number;
6
+ duration: number;
7
+ };
8
+ declare const slideVariants: Variants;
9
+
10
+ export { slideVariants, transition };
@@ -0,0 +1,10 @@
1
+ import { Variants } from 'framer-motion';
2
+
3
+ declare const transition: {
4
+ type: string;
5
+ bounce: number;
6
+ duration: number;
7
+ };
8
+ declare const slideVariants: Variants;
9
+
10
+ export { slideVariants, transition };
@@ -0,0 +1,48 @@
1
+ "use client";
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/calendar-transitions.ts
22
+ var calendar_transitions_exports = {};
23
+ __export(calendar_transitions_exports, {
24
+ slideVariants: () => slideVariants,
25
+ transition: () => transition
26
+ });
27
+ module.exports = __toCommonJS(calendar_transitions_exports);
28
+ var transition = {
29
+ type: "spring",
30
+ bounce: 0,
31
+ duration: 0.3
32
+ };
33
+ var slideVariants = {
34
+ enter: (direction) => ({
35
+ x: `${direction * 100}%`
36
+ }),
37
+ center: {
38
+ x: "0%"
39
+ },
40
+ exit: (direction) => ({
41
+ x: `${direction * -100}%`
42
+ })
43
+ };
44
+ // Annotate the CommonJS export names for ESM import in node:
45
+ 0 && (module.exports = {
46
+ slideVariants,
47
+ transition
48
+ });
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import {
3
+ slideVariants,
4
+ transition
5
+ } from "./chunk-5CY7DCRB.mjs";
6
+ export {
7
+ slideVariants,
8
+ transition
9
+ };
@@ -0,0 +1,24 @@
1
+ import { DateValue } from '@internationalized/date';
2
+ import { ReactElement } from 'react';
3
+ import { UseCalendarProps } from './use-calendar.mjs';
4
+ import '@sytechui/theme';
5
+ import 'tailwind-variants';
6
+ import '@sytechui/system';
7
+ import '@react-types/calendar';
8
+ import '@react-stately/calendar';
9
+ import './use-calendar-base.mjs';
10
+ import '@react-types/shared';
11
+ import '@sytechui/system/src/types';
12
+ import '@react-aria/calendar';
13
+ import '@react-types/button';
14
+ import '@sytechui/button';
15
+ import '@sytechui/react-utils';
16
+ import './calendar-base.mjs';
17
+ import 'react/jsx-runtime';
18
+
19
+ interface Props<T extends DateValue> extends Omit<UseCalendarProps<T>, "isHeaderWrapperExpanded"> {
20
+ }
21
+ type CalendarProps<T extends DateValue = DateValue> = Props<T>;
22
+ declare const Calendar: <T extends DateValue>(props: CalendarProps<T>) => ReactElement;
23
+
24
+ export { type CalendarProps, Calendar as default };
@@ -0,0 +1,24 @@
1
+ import { DateValue } from '@internationalized/date';
2
+ import { ReactElement } from 'react';
3
+ import { UseCalendarProps } from './use-calendar.js';
4
+ import '@sytechui/theme';
5
+ import 'tailwind-variants';
6
+ import '@sytechui/system';
7
+ import '@react-types/calendar';
8
+ import '@react-stately/calendar';
9
+ import './use-calendar-base.js';
10
+ import '@react-types/shared';
11
+ import '@sytechui/system/src/types';
12
+ import '@react-aria/calendar';
13
+ import '@react-types/button';
14
+ import '@sytechui/button';
15
+ import '@sytechui/react-utils';
16
+ import './calendar-base.js';
17
+ import 'react/jsx-runtime';
18
+
19
+ interface Props<T extends DateValue> extends Omit<UseCalendarProps<T>, "isHeaderWrapperExpanded"> {
20
+ }
21
+ type CalendarProps<T extends DateValue = DateValue> = Props<T>;
22
+ declare const Calendar: <T extends DateValue>(props: CalendarProps<T>) => ReactElement;
23
+
24
+ export { type CalendarProps, Calendar as default };