@react-fabric/superdate 1.0.0-beta.62 → 1.0.0-beta.63

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.
@@ -25,9 +25,9 @@ var SuperDateTabs = function SuperDateTabs(_ref) {
25
25
  var _useTranslation = reactI18next.useTranslation("superdate"),
26
26
  t = _useTranslation.t;
27
27
  var tree = react$1.useFloatingTree();
28
- var _useGlobals = core.useGlobals(),
29
- currentCalendar = _useGlobals.currentCalendar,
30
- currentLocale = _useGlobals.currentLocale;
28
+ var _useApplicationContex = core.useApplicationContext(),
29
+ currentCalendar = _useApplicationContex.currentCalendar,
30
+ currentLocale = _useApplicationContex.currentLocale;
31
31
  var isHijri = react.useMemo(function () {
32
32
  return currentCalendar === "hijri";
33
33
  }, [currentCalendar]);
@@ -129,7 +129,7 @@ var SuperDateTabs = function SuperDateTabs(_ref) {
129
129
  * - `$month|$week`: Represents the current month starting from the beginning of the month to the end of current week.
130
130
  *
131
131
  * @param {SuperDateProps} props - The properties for the SuperDate component.
132
- * @returns {JSX.Element} The rendered SuperDate component.
132
+ * @returns {React.ReactElement} The rendered SuperDate component.
133
133
  *
134
134
  * @example
135
135
  * ```jsx
@@ -164,9 +164,9 @@ var SuperDate = function SuperDate(_ref4) {
164
164
  testValue = _ref4["data-test-value"],
165
165
  testId = _ref4["data-testid"],
166
166
  props = _objectWithoutProperties(_ref4, _excluded);
167
- var _useGlobals2 = core.useGlobals(),
168
- currentCalendar = _useGlobals2.currentCalendar,
169
- currentLocale = _useGlobals2.currentLocale;
167
+ var _useApplicationContex2 = core.useApplicationContext(),
168
+ currentCalendar = _useApplicationContex2.currentCalendar,
169
+ currentLocale = _useApplicationContex2.currentLocale;
170
170
  var isHijri = react.useMemo(function () {
171
171
  return currentCalendar === "hijri";
172
172
  }, [currentCalendar]);
@@ -4,7 +4,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
4
4
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
5
5
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
6
6
  import { useFloatingTree } from '@floating-ui/react';
7
- import { useGlobals, Dropdown, Tooltip, TabPanel, Tab, Content, Button, Chip } from '@react-fabric/core';
7
+ import { useApplicationContext, Dropdown, Tooltip, TabPanel, Tab, Content, Button, Chip } from '@react-fabric/core';
8
8
  import { DateUtil, RangePanel, EventPanel } from '@react-fabric/date';
9
9
  import classNames from 'classnames';
10
10
  import { useMemo, useState, useEffect, useCallback } from 'react';
@@ -25,9 +25,9 @@ var SuperDateTabs = function SuperDateTabs(_ref) {
25
25
  var _useTranslation = useTranslation("superdate"),
26
26
  t = _useTranslation.t;
27
27
  var tree = useFloatingTree();
28
- var _useGlobals = useGlobals(),
29
- currentCalendar = _useGlobals.currentCalendar,
30
- currentLocale = _useGlobals.currentLocale;
28
+ var _useApplicationContex = useApplicationContext(),
29
+ currentCalendar = _useApplicationContex.currentCalendar,
30
+ currentLocale = _useApplicationContex.currentLocale;
31
31
  var isHijri = useMemo(function () {
32
32
  return currentCalendar === "hijri";
33
33
  }, [currentCalendar]);
@@ -129,7 +129,7 @@ var SuperDateTabs = function SuperDateTabs(_ref) {
129
129
  * - `$month|$week`: Represents the current month starting from the beginning of the month to the end of current week.
130
130
  *
131
131
  * @param {SuperDateProps} props - The properties for the SuperDate component.
132
- * @returns {JSX.Element} The rendered SuperDate component.
132
+ * @returns {React.ReactElement} The rendered SuperDate component.
133
133
  *
134
134
  * @example
135
135
  * ```jsx
@@ -164,9 +164,9 @@ var SuperDate = function SuperDate(_ref4) {
164
164
  testValue = _ref4["data-test-value"],
165
165
  testId = _ref4["data-testid"],
166
166
  props = _objectWithoutProperties(_ref4, _excluded);
167
- var _useGlobals2 = useGlobals(),
168
- currentCalendar = _useGlobals2.currentCalendar,
169
- currentLocale = _useGlobals2.currentLocale;
167
+ var _useApplicationContex2 = useApplicationContext(),
168
+ currentCalendar = _useApplicationContex2.currentCalendar,
169
+ currentLocale = _useApplicationContex2.currentLocale;
170
170
  var isHijri = useMemo(function () {
171
171
  return currentCalendar === "hijri";
172
172
  }, [currentCalendar]);
@@ -26,7 +26,7 @@ export declare const SuperDateTabs: ({ events, value, presets, recurringEvents,
26
26
  * - `$month|$week`: Represents the current month starting from the beginning of the month to the end of current week.
27
27
  *
28
28
  * @param {SuperDateProps} props - The properties for the SuperDate component.
29
- * @returns {JSX.Element} The rendered SuperDate component.
29
+ * @returns {React.ReactElement} The rendered SuperDate component.
30
30
  *
31
31
  * @example
32
32
  * ```jsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-fabric/superdate",
3
- "version": "1.0.0-beta.62",
3
+ "version": "1.0.0-beta.63",
4
4
  "description": "RUF: Superdate package for relative dates",
5
5
  "author": "Adarsh Pastakia <adarshpastakia@outlook.com>",
6
6
  "license": "MIT",
@@ -35,25 +35,24 @@
35
35
  "watch": "npm-run-all -p watch:rollup watch:dts"
36
36
  },
37
37
  "dependencies": {
38
- "@floating-ui/react": "~0.27.16",
38
+ "@floating-ui/react": "~0.27.19",
39
39
  "@hookform/resolvers": "~5.2.2",
40
- "@react-fabric/core": "^1.0.0-beta.62",
41
- "@react-fabric/date": "^1.0.0-beta.62",
42
- "@react-fabric/form": "^1.0.0-beta.62",
43
- "@react-fabric/utilities": "^1.0.0-beta.62",
40
+ "@react-fabric/core": "^1.0.0-beta.63",
41
+ "@react-fabric/date": "^1.0.0-beta.63",
42
+ "@react-fabric/form": "^1.0.0-beta.63",
43
+ "@react-fabric/utilities": "^1.0.0-beta.63",
44
44
  "classnames": "~2.5.1",
45
- "date-fns": "~4.1.0",
46
- "resize-observer-polyfill": "~1.5.1"
45
+ "react-hook-form": "~7.71.2"
47
46
  },
48
47
  "peerDependencies": {
49
- "i18next": "~25.6.0",
50
- "react": "~19.2.0",
51
- "react-dom": "~19.2.0",
52
- "react-i18next": "~16.2.1"
48
+ "i18next": "~25.8.18",
49
+ "react": "~19.2.4",
50
+ "react-dom": "~19.2.4",
51
+ "react-i18next": "~16.5.8"
53
52
  },
54
53
  "engines": {
55
- "node": ">=18.12.0",
56
- "npm": ">=8.19.0"
54
+ "node": ">=22.18.0",
55
+ "npm": ">=10.8.0"
57
56
  },
58
- "gitHead": "9dce2fd9bb753d67e3f8adbf50be257b4bc64242"
57
+ "gitHead": "6e0652b15c6384fbc316842862572e21299a5466"
59
58
  }
@@ -30,7 +30,7 @@ import {
30
30
  Tab,
31
31
  TabPanel,
32
32
  Tooltip,
33
- useGlobals,
33
+ useApplicationContext,
34
34
  } from "@react-fabric/core";
35
35
  import { DateUtil, EventPanel, RangePanel } from "@react-fabric/date";
36
36
  import classNames from "classnames";
@@ -49,7 +49,7 @@ export const SuperDateTabs = ({
49
49
  }: SuperDateProps) => {
50
50
  const { t } = useTranslation("superdate");
51
51
  const tree = useFloatingTree();
52
- const { currentCalendar, currentLocale } = useGlobals();
52
+ const { currentCalendar, currentLocale } = useApplicationContext();
53
53
 
54
54
  const isHijri = useMemo(() => currentCalendar === "hijri", [currentCalendar]);
55
55
 
@@ -152,7 +152,7 @@ export const SuperDateTabs = ({
152
152
  * - `$month|$week`: Represents the current month starting from the beginning of the month to the end of current week.
153
153
  *
154
154
  * @param {SuperDateProps} props - The properties for the SuperDate component.
155
- * @returns {JSX.Element} The rendered SuperDate component.
155
+ * @returns {React.ReactElement} The rendered SuperDate component.
156
156
  *
157
157
  * @example
158
158
  * ```jsx
@@ -185,7 +185,7 @@ export const SuperDate = ({
185
185
  "data-testid": testId,
186
186
  ...props
187
187
  }: SuperDateProps) => {
188
- const { currentCalendar, currentLocale } = useGlobals();
188
+ const { currentCalendar, currentLocale } = useApplicationContext();
189
189
 
190
190
  const isHijri = useMemo(() => currentCalendar === "hijri", [currentCalendar]);
191
191