rsuite 5.79.0 → 5.80.0
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.
- package/CHANGELOG.md +24 -0
- package/cjs/Calendar/Calendar.js +1 -2
- package/cjs/Calendar/CalendarBody.js +0 -2
- package/cjs/Calendar/CalendarContainer.js +1 -2
- package/cjs/Calendar/CalendarProvider.d.ts +1 -1
- package/cjs/Calendar/Grid/GridHeaderRow.js +1 -2
- package/cjs/Calendar/Grid/GridRow.d.ts +2 -0
- package/cjs/Calendar/Grid/GridRow.js +6 -4
- package/cjs/Calendar/hooks/useCalendar.d.ts +25 -2
- package/cjs/Calendar/hooks/useCalendar.js +36 -1
- package/cjs/CustomProvider/CustomContext.d.ts +253 -0
- package/cjs/CustomProvider/CustomContext.js +8 -0
- package/cjs/CustomProvider/CustomProvider.d.ts +1 -258
- package/cjs/CustomProvider/CustomProvider.js +2 -3
- package/cjs/CustomProvider/FormattedDate.js +2 -2
- package/cjs/CustomProvider/FormattedNumber.js +2 -2
- package/cjs/CustomProvider/index.d.ts +2 -2
- package/cjs/CustomProvider/index.js +4 -4
- package/cjs/CustomProvider/useCustom.js +2 -2
- package/cjs/DatePicker/DatePicker.js +1 -2
- package/cjs/DateRangePicker/DateRangePicker.js +1 -2
- package/cjs/DateRangePicker/utils.d.ts +1 -1
- package/cjs/DateRangePicker/utils.js +2 -1
- package/cjs/Image/hooks/useImage.js +2 -3
- package/cjs/InlineEdit/InlineEdit.js +3 -1
- package/cjs/InlineEdit/useEditState.d.ts +2 -0
- package/cjs/InlineEdit/useEditState.js +9 -1
- package/cjs/List/List.js +6 -2
- package/cjs/List/helper/useSortHelper.d.ts +7 -5
- package/cjs/List/helper/useSortHelper.js +109 -16
- package/cjs/List/helper/utils.js +15 -7
- package/cjs/internals/Picker/propTypes.d.ts +2 -2
- package/cjs/internals/hooks/useClassNames.js +2 -2
- package/cjs/internals/utils/date/getWeekStartDates.d.ts +0 -1
- package/cjs/internals/utils/date/getWeekStartDates.js +2 -5
- package/cjs/internals/utils/date/index.d.ts +1 -0
- package/cjs/internals/utils/date/index.js +4 -1
- package/cjs/useToaster/useToaster.js +2 -2
- package/dist/rsuite.js +69 -25
- package/dist/rsuite.js.map +1 -1
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.map +1 -1
- package/esm/Calendar/Calendar.js +1 -2
- package/esm/Calendar/CalendarBody.js +0 -2
- package/esm/Calendar/CalendarContainer.js +1 -2
- package/esm/Calendar/CalendarProvider.d.ts +1 -1
- package/esm/Calendar/Grid/GridHeaderRow.js +1 -2
- package/esm/Calendar/Grid/GridRow.d.ts +2 -0
- package/esm/Calendar/Grid/GridRow.js +6 -4
- package/esm/Calendar/hooks/useCalendar.d.ts +25 -2
- package/esm/Calendar/hooks/useCalendar.js +36 -2
- package/esm/CustomProvider/CustomContext.d.ts +253 -0
- package/esm/CustomProvider/CustomContext.js +3 -0
- package/esm/CustomProvider/CustomProvider.d.ts +1 -258
- package/esm/CustomProvider/CustomProvider.js +1 -1
- package/esm/CustomProvider/FormattedDate.js +1 -1
- package/esm/CustomProvider/FormattedNumber.js +1 -1
- package/esm/CustomProvider/index.d.ts +2 -2
- package/esm/CustomProvider/index.js +1 -1
- package/esm/CustomProvider/useCustom.js +1 -1
- package/esm/DatePicker/DatePicker.js +1 -2
- package/esm/DateRangePicker/DateRangePicker.js +1 -2
- package/esm/DateRangePicker/utils.d.ts +1 -1
- package/esm/DateRangePicker/utils.js +2 -1
- package/esm/Image/hooks/useImage.js +1 -1
- package/esm/InlineEdit/InlineEdit.js +3 -1
- package/esm/InlineEdit/useEditState.d.ts +2 -0
- package/esm/InlineEdit/useEditState.js +9 -1
- package/esm/List/List.js +6 -2
- package/esm/List/helper/useSortHelper.d.ts +7 -5
- package/esm/List/helper/useSortHelper.js +109 -16
- package/esm/List/helper/utils.js +15 -7
- package/esm/internals/Picker/propTypes.d.ts +2 -2
- package/esm/internals/hooks/useClassNames.js +1 -1
- package/esm/internals/utils/date/getWeekStartDates.d.ts +0 -1
- package/esm/internals/utils/date/getWeekStartDates.js +2 -5
- package/esm/internals/utils/date/index.d.ts +1 -0
- package/esm/internals/utils/date/index.js +1 -0
- package/esm/useToaster/useToaster.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
# [5.80.0](https://github.com/rsuite/rsuite/compare/v5.79.1...v5.80.0) (2025-04-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **calendar:** adjust priority of weekStart over isoWeek ([#4234](https://github.com/rsuite/rsuite/issues/4234)) ([4697f22](https://github.com/rsuite/rsuite/commit/4697f221fef5d16edc4b8a18a7491aa7d2187a85))
|
|
7
|
+
* **vite:** resolve circular dependency between chunks ([#4246](https://github.com/rsuite/rsuite/issues/4246)) ([9dca238](https://github.com/rsuite/rsuite/commit/9dca23899d007bcd204711da56c3a98323b87e7d))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **InlineEdit:** enhance focus handling with TAB navigation support ([#4226](https://github.com/rsuite/rsuite/issues/4226)) ([18d4f6a](https://github.com/rsuite/rsuite/commit/18d4f6a4554fb7c07d6972563272fa67f0ebd1b4))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [5.79.1](https://github.com/rsuite/rsuite/compare/v5.79.0...v5.79.1) (2025-04-03)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **List:** fix sorting issue on mobile devices ([#4215](https://github.com/rsuite/rsuite/issues/4215)) ([5b74d8b](https://github.com/rsuite/rsuite/commit/5b74d8b6e09e3d662e63f0c437a28585f2535a94))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
1
25
|
# [5.79.0](https://github.com/rsuite/rsuite/compare/v5.78.1...v5.79.0) (2025-03-26)
|
|
2
26
|
|
|
3
27
|
|
package/cjs/Calendar/Calendar.js
CHANGED
|
@@ -32,8 +32,7 @@ var Calendar = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
32
32
|
_propsWithDefaults$de = propsWithDefaults.defaultValue,
|
|
33
33
|
defaultValue = _propsWithDefaults$de === void 0 ? (0, _date.startOfDay)(new Date()) : _propsWithDefaults$de,
|
|
34
34
|
isoWeek = propsWithDefaults.isoWeek,
|
|
35
|
-
|
|
36
|
-
weekStart = _propsWithDefaults$we === void 0 ? 0 : _propsWithDefaults$we,
|
|
35
|
+
weekStart = propsWithDefaults.weekStart,
|
|
37
36
|
locale = propsWithDefaults.locale,
|
|
38
37
|
onChange = propsWithDefaults.onChange,
|
|
39
38
|
onMonthChange = propsWithDefaults.onMonthChange,
|
|
@@ -23,7 +23,6 @@ var CalendarBody = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
23
23
|
var _useCalendar = (0, _hooks2.useCalendar)(),
|
|
24
24
|
_useCalendar$date = _useCalendar.date,
|
|
25
25
|
date = _useCalendar$date === void 0 ? new Date() : _useCalendar$date,
|
|
26
|
-
isoWeek = _useCalendar.isoWeek,
|
|
27
26
|
overrideLocale = _useCalendar.locale,
|
|
28
27
|
weekStart = _useCalendar.weekStart;
|
|
29
28
|
var _useCustom = (0, _CustomProvider.useCustom)(),
|
|
@@ -40,7 +39,6 @@ var CalendarBody = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
40
39
|
className: classes
|
|
41
40
|
}), /*#__PURE__*/_react.default.createElement(_Grid.default, {
|
|
42
41
|
rows: (0, _date.getWeekStartDates)(thisMonthDate, {
|
|
43
|
-
isoWeek: isoWeek,
|
|
44
42
|
weekStart: weekStart,
|
|
45
43
|
locale: locale === null || locale === void 0 ? void 0 : locale.dateLocale
|
|
46
44
|
}),
|
|
@@ -36,8 +36,7 @@ var CalendarContainer = /*#__PURE__*/_react.default.forwardRef(function (props,
|
|
|
36
36
|
inline = props.inline,
|
|
37
37
|
_props$isoWeek = props.isoWeek,
|
|
38
38
|
isoWeek = _props$isoWeek === void 0 ? false : _props$isoWeek,
|
|
39
|
-
|
|
40
|
-
weekStart = _props$weekStart === void 0 ? 0 : _props$weekStart,
|
|
39
|
+
weekStart = props.weekStart,
|
|
41
40
|
targetId = props.targetId,
|
|
42
41
|
limitEndYear = props.limitEndYear,
|
|
43
42
|
limitStartYear = props.limitStartYear,
|
|
@@ -34,7 +34,7 @@ export interface CalendarInnerContextValue {
|
|
|
34
34
|
* The start day of the week in the calendar.
|
|
35
35
|
* 0 - Sunday, 1 - Monday, 2 - Tuesday, 3 - Wednesday, 4 - Thursday, 5 - Friday, 6 - Saturday
|
|
36
36
|
*/
|
|
37
|
-
weekStart
|
|
37
|
+
weekStart?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
38
38
|
/**
|
|
39
39
|
* Indicates whether week numbers should be shown in the calendar.
|
|
40
40
|
*/
|
|
@@ -22,13 +22,12 @@ var GridHeaderRow = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
22
22
|
var _useCalendar = (0, _hooks2.useCalendar)(),
|
|
23
23
|
locale = _useCalendar.locale,
|
|
24
24
|
showWeekNumbers = _useCalendar.showWeekNumbers,
|
|
25
|
-
isoWeek = _useCalendar.isoWeek,
|
|
26
25
|
weekStart = _useCalendar.weekStart;
|
|
27
26
|
var _useClassNames = (0, _hooks.useClassNames)(classPrefix),
|
|
28
27
|
merge = _useClassNames.merge,
|
|
29
28
|
prefix = _useClassNames.prefix;
|
|
30
29
|
var classes = merge(className, prefix('row', 'header-row'));
|
|
31
|
-
var weeks = (0, _date.getWeekKeys)(
|
|
30
|
+
var weeks = (0, _date.getWeekKeys)(weekStart);
|
|
32
31
|
return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({
|
|
33
32
|
role: "row"
|
|
34
33
|
}, rest, {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { RsRefForwardingComponent, WithAsProps } from '../../internals/types';
|
|
2
2
|
export interface GridRowProps extends WithAsProps {
|
|
3
|
+
/** The weekend: Sunday */
|
|
3
4
|
weekendDate?: Date;
|
|
5
|
+
/** The index of the row */
|
|
4
6
|
rowIndex?: number;
|
|
5
7
|
}
|
|
6
8
|
declare const GridRow: RsRefForwardingComponent<'div', GridRowProps>;
|
|
@@ -102,12 +102,14 @@ var GridRow = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
102
102
|
};
|
|
103
103
|
var classes = merge(className, prefix('row'));
|
|
104
104
|
var _ref3 = (_locale$dateLocale$op = locale === null || locale === void 0 || (_locale$dateLocale = locale.dateLocale) === null || _locale$dateLocale === void 0 ? void 0 : _locale$dateLocale.options) !== null && _locale$dateLocale$op !== void 0 ? _locale$dateLocale$op : {},
|
|
105
|
-
firstWeekContainsDate = _ref3.firstWeekContainsDate
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
firstWeekContainsDate = _ref3.firstWeekContainsDate;
|
|
106
|
+
|
|
107
|
+
// ISO week starts on Monday
|
|
108
|
+
var date = isoWeek ? (0, _date.addDays)(weekendDate, 1) : weekendDate;
|
|
109
|
+
var week = (0, _date.format)(date, isoWeek ? 'I' : 'w', {
|
|
108
110
|
locale: locale === null || locale === void 0 ? void 0 : locale.dateLocale,
|
|
109
111
|
firstWeekContainsDate: firstWeekContainsDate,
|
|
110
|
-
weekStartsOn: weekStart
|
|
112
|
+
weekStartsOn: weekStart
|
|
111
113
|
});
|
|
112
114
|
return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, rest, {
|
|
113
115
|
ref: ref,
|
|
@@ -1,2 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/// <reference types="date-fns" />
|
|
3
|
+
export declare const useCalendar: () => {
|
|
4
|
+
formatDate?: typeof import("date-fns").format | undefined;
|
|
5
|
+
date?: Date | undefined;
|
|
6
|
+
dateRange?: Date[] | undefined;
|
|
7
|
+
format?: string | undefined;
|
|
8
|
+
hoverRangeValue?: [Date, Date] | undefined;
|
|
9
|
+
inline?: boolean | undefined;
|
|
10
|
+
targetId?: string | undefined;
|
|
11
|
+
monthDropdownProps?: import("../types").MonthDropdownProps | undefined;
|
|
12
|
+
disabledDate?: ((date: Date, selectRangeValue?: Date[] | undefined, type?: string | undefined) => boolean) | undefined;
|
|
13
|
+
inSameMonth?: ((date: Date) => boolean) | undefined;
|
|
14
|
+
onChangeMonth?: ((nextPageDate: Date, event: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
15
|
+
onChangeTime?: ((nextPageTime: Date, event: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
16
|
+
onMouseMove?: ((date: Date) => void) | undefined;
|
|
17
|
+
onSelect?: ((date: Date, event: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
18
|
+
renderCell?: ((date: Date) => import("react").ReactNode) | undefined;
|
|
19
|
+
renderCellOnPicker?: ((date: Date) => import("react").ReactNode) | undefined;
|
|
20
|
+
cellClassName?: ((date: Date) => string | undefined) | undefined;
|
|
21
|
+
locale: import("../..").CalendarLocale | undefined;
|
|
22
|
+
showWeekNumbers: boolean | undefined;
|
|
23
|
+
isoWeek: boolean;
|
|
24
|
+
weekStart: 0 | 2 | 1 | 3 | 4 | 5 | 6;
|
|
25
|
+
};
|
|
@@ -1,10 +1,45 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
5
|
exports.__esModule = true;
|
|
5
6
|
exports.useCalendar = void 0;
|
|
7
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
8
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
6
9
|
var _react = require("react");
|
|
7
10
|
var _CalendarProvider = require("../CalendarProvider");
|
|
11
|
+
var _excluded = ["locale", "showWeekNumbers", "isoWeek", "weekStart"];
|
|
8
12
|
var useCalendar = exports.useCalendar = function useCalendar() {
|
|
9
|
-
|
|
13
|
+
var _locale$dateLocale2;
|
|
14
|
+
var _useContext = (0, _react.useContext)(_CalendarProvider.CalendarContext),
|
|
15
|
+
locale = _useContext.locale,
|
|
16
|
+
showWeekNumbers = _useContext.showWeekNumbers,
|
|
17
|
+
isoWeek = _useContext.isoWeek,
|
|
18
|
+
weekStartProp = _useContext.weekStart,
|
|
19
|
+
rest = (0, _objectWithoutPropertiesLoose2.default)(_useContext, _excluded);
|
|
20
|
+
|
|
21
|
+
// Determine the start of the week based on various conditions
|
|
22
|
+
var weekStart = (0, _react.useMemo)(function () {
|
|
23
|
+
var _locale$dateLocale;
|
|
24
|
+
// If weekStartProp is explicitly provided, use it
|
|
25
|
+
if (typeof weekStartProp !== 'undefined') {
|
|
26
|
+
return weekStartProp;
|
|
27
|
+
}
|
|
28
|
+
// If using ISO week, start on Monday (1)
|
|
29
|
+
else if (isoWeek) {
|
|
30
|
+
return 1;
|
|
31
|
+
}
|
|
32
|
+
// If locale specifies a weekStartsOn option, use it
|
|
33
|
+
else if ((locale === null || locale === void 0 || (_locale$dateLocale = locale.dateLocale) === null || _locale$dateLocale === void 0 || (_locale$dateLocale = _locale$dateLocale.options) === null || _locale$dateLocale === void 0 ? void 0 : _locale$dateLocale.weekStartsOn) !== undefined) {
|
|
34
|
+
return locale.dateLocale.options.weekStartsOn;
|
|
35
|
+
}
|
|
36
|
+
// Default to Sunday (0) if no other condition is met
|
|
37
|
+
return 0;
|
|
38
|
+
}, [weekStartProp, isoWeek, locale === null || locale === void 0 || (_locale$dateLocale2 = locale.dateLocale) === null || _locale$dateLocale2 === void 0 || (_locale$dateLocale2 = _locale$dateLocale2.options) === null || _locale$dateLocale2 === void 0 ? void 0 : _locale$dateLocale2.weekStartsOn]);
|
|
39
|
+
return (0, _extends2.default)({
|
|
40
|
+
locale: locale,
|
|
41
|
+
showWeekNumbers: showWeekNumbers,
|
|
42
|
+
isoWeek: isoWeek,
|
|
43
|
+
weekStart: weekStart
|
|
44
|
+
}, rest);
|
|
10
45
|
};
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FormatDateOptions } from '../internals/utils/date/types';
|
|
3
|
+
import type { ToastContainerInstance } from '../toaster/ToastContainer';
|
|
4
|
+
import type { ReactSuiteComponents } from './types';
|
|
5
|
+
import type { Locale } from '../locales';
|
|
6
|
+
export interface CustomValue<T = Locale> {
|
|
7
|
+
/**
|
|
8
|
+
* The prefix of the component CSS class
|
|
9
|
+
*/
|
|
10
|
+
classPrefix?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The locale object that contains the language and formatting rules for the date.
|
|
13
|
+
*/
|
|
14
|
+
locale: T;
|
|
15
|
+
/**
|
|
16
|
+
* Right-to-left text direction.
|
|
17
|
+
*/
|
|
18
|
+
rtl: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Return the formatted date string in the given format. The result may vary by locale.
|
|
21
|
+
*
|
|
22
|
+
* Example:
|
|
23
|
+
*
|
|
24
|
+
* import format from 'date-fns/format';
|
|
25
|
+
* import eo from 'date-fns/locale/eo'
|
|
26
|
+
*
|
|
27
|
+
* function formatDate(date, formatStr) {
|
|
28
|
+
* return format(date, formatStr, { locale: eo });
|
|
29
|
+
* }
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
formatDate: (date: Date | number, format: string, options?: FormatDateOptions) => string;
|
|
33
|
+
/**
|
|
34
|
+
* Return the date parsed from string using the given format string.
|
|
35
|
+
*
|
|
36
|
+
* Example:
|
|
37
|
+
*
|
|
38
|
+
* import parse from 'date-fns/parse';
|
|
39
|
+
* import eo from 'date-fns/locale/eo'
|
|
40
|
+
*
|
|
41
|
+
* function parseDate(date, formatStr) {
|
|
42
|
+
* return parse(date, formatStr, new Date(), { locale: eo });
|
|
43
|
+
* }
|
|
44
|
+
*
|
|
45
|
+
*/
|
|
46
|
+
parseDate: (dateString: string, formatString: string, referenceDate?: Date | number, options?: FormatDateOptions) => Date;
|
|
47
|
+
/**
|
|
48
|
+
* A Map of toast containers
|
|
49
|
+
*/
|
|
50
|
+
toasters?: React.MutableRefObject<Map<string, ToastContainerInstance>>;
|
|
51
|
+
/**
|
|
52
|
+
* If true, the ripple effect is disabled.
|
|
53
|
+
* Affected components include: Button, Nav.Item, Pagination.
|
|
54
|
+
*/
|
|
55
|
+
disableRipple?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface CustomProviderProps<T = Locale> extends Partial<CustomValue<T>> {
|
|
58
|
+
/**
|
|
59
|
+
* Supported themes
|
|
60
|
+
*/
|
|
61
|
+
theme?: 'light' | 'dark' | 'high-contrast';
|
|
62
|
+
/**
|
|
63
|
+
* The prefix of the icon CSS class
|
|
64
|
+
*/
|
|
65
|
+
iconClassPrefix?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Primary content
|
|
68
|
+
*/
|
|
69
|
+
children?: React.ReactNode;
|
|
70
|
+
/**
|
|
71
|
+
* Sets a container for toast rendering
|
|
72
|
+
*/
|
|
73
|
+
toastContainer?: HTMLElement | (() => HTMLElement | null) | null;
|
|
74
|
+
csp?: {
|
|
75
|
+
/**
|
|
76
|
+
* Content Security Policy nonce
|
|
77
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce
|
|
78
|
+
*/
|
|
79
|
+
nonce?: string;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Disable inline styles
|
|
83
|
+
* @default false
|
|
84
|
+
*/
|
|
85
|
+
disableInlineStyles?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* components allows setting default props for specific components globally.
|
|
88
|
+
* It accepts an object where each key represents a component name (e.g., 'Button', 'Input'),
|
|
89
|
+
* and the corresponding value is an object containing the `defaultProps` object.
|
|
90
|
+
* The `defaultProps` object defines the default props for that component.
|
|
91
|
+
* These props will be automatically applied to the component unless overridden by specific props
|
|
92
|
+
* passed in an individual component instance.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```js
|
|
96
|
+
* components={{
|
|
97
|
+
* Button: { defaultProps: { appearance: 'primary', size: 'lg' } },
|
|
98
|
+
* Input: { defaultProps: { placeholder: 'Enter text', size: 'lg' } }
|
|
99
|
+
* }}
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
components?: Partial<ReactSuiteComponents>;
|
|
103
|
+
}
|
|
104
|
+
export declare const CustomContext: React.Context<CustomProviderProps<{
|
|
105
|
+
code?: string | undefined;
|
|
106
|
+
common?: {
|
|
107
|
+
loading: string;
|
|
108
|
+
emptyMessage: string;
|
|
109
|
+
remove: string;
|
|
110
|
+
clear: string;
|
|
111
|
+
} | undefined;
|
|
112
|
+
Plaintext?: {
|
|
113
|
+
unfilled: string;
|
|
114
|
+
notSelected: string;
|
|
115
|
+
notUploaded: string;
|
|
116
|
+
} | undefined;
|
|
117
|
+
Pagination?: {
|
|
118
|
+
more: string;
|
|
119
|
+
prev: string;
|
|
120
|
+
next: string;
|
|
121
|
+
first: string;
|
|
122
|
+
last: string;
|
|
123
|
+
limit: string;
|
|
124
|
+
total: string;
|
|
125
|
+
skip: string;
|
|
126
|
+
} | undefined;
|
|
127
|
+
DateTimeFormats?: {
|
|
128
|
+
sunday: string;
|
|
129
|
+
monday: string;
|
|
130
|
+
tuesday: string;
|
|
131
|
+
wednesday: string;
|
|
132
|
+
thursday: string;
|
|
133
|
+
friday: string;
|
|
134
|
+
saturday: string;
|
|
135
|
+
ok: string;
|
|
136
|
+
today: string;
|
|
137
|
+
yesterday: string;
|
|
138
|
+
now: string;
|
|
139
|
+
hours: string;
|
|
140
|
+
minutes: string;
|
|
141
|
+
seconds: string;
|
|
142
|
+
formattedMonthPattern: string;
|
|
143
|
+
formattedDayPattern: string;
|
|
144
|
+
shortDateFormat: string;
|
|
145
|
+
shortTimeFormat: string;
|
|
146
|
+
dateLocale: any;
|
|
147
|
+
} | undefined;
|
|
148
|
+
Calendar?: {
|
|
149
|
+
sunday: string;
|
|
150
|
+
monday: string;
|
|
151
|
+
tuesday: string;
|
|
152
|
+
wednesday: string;
|
|
153
|
+
thursday: string;
|
|
154
|
+
friday: string;
|
|
155
|
+
saturday: string;
|
|
156
|
+
ok: string;
|
|
157
|
+
today: string;
|
|
158
|
+
yesterday: string;
|
|
159
|
+
now: string;
|
|
160
|
+
hours: string;
|
|
161
|
+
minutes: string;
|
|
162
|
+
seconds: string;
|
|
163
|
+
formattedMonthPattern: string;
|
|
164
|
+
formattedDayPattern: string;
|
|
165
|
+
shortDateFormat: string;
|
|
166
|
+
shortTimeFormat: string;
|
|
167
|
+
dateLocale: any;
|
|
168
|
+
} | undefined;
|
|
169
|
+
DatePicker?: {
|
|
170
|
+
sunday: string;
|
|
171
|
+
monday: string;
|
|
172
|
+
tuesday: string;
|
|
173
|
+
wednesday: string;
|
|
174
|
+
thursday: string;
|
|
175
|
+
friday: string;
|
|
176
|
+
saturday: string;
|
|
177
|
+
ok: string;
|
|
178
|
+
today: string;
|
|
179
|
+
yesterday: string;
|
|
180
|
+
now: string;
|
|
181
|
+
hours: string;
|
|
182
|
+
minutes: string;
|
|
183
|
+
seconds: string;
|
|
184
|
+
formattedMonthPattern: string;
|
|
185
|
+
formattedDayPattern: string;
|
|
186
|
+
shortDateFormat: string;
|
|
187
|
+
shortTimeFormat: string;
|
|
188
|
+
dateLocale: any;
|
|
189
|
+
} | undefined;
|
|
190
|
+
DateRangePicker?: {
|
|
191
|
+
last7Days: string;
|
|
192
|
+
sunday: string;
|
|
193
|
+
monday: string;
|
|
194
|
+
tuesday: string;
|
|
195
|
+
wednesday: string;
|
|
196
|
+
thursday: string;
|
|
197
|
+
friday: string;
|
|
198
|
+
saturday: string;
|
|
199
|
+
ok: string;
|
|
200
|
+
today: string;
|
|
201
|
+
yesterday: string;
|
|
202
|
+
now: string;
|
|
203
|
+
hours: string;
|
|
204
|
+
minutes: string;
|
|
205
|
+
seconds: string;
|
|
206
|
+
formattedMonthPattern: string;
|
|
207
|
+
formattedDayPattern: string;
|
|
208
|
+
shortDateFormat: string;
|
|
209
|
+
shortTimeFormat: string;
|
|
210
|
+
dateLocale: any;
|
|
211
|
+
} | undefined;
|
|
212
|
+
Combobox?: {
|
|
213
|
+
noResultsText: string;
|
|
214
|
+
placeholder: string;
|
|
215
|
+
searchPlaceholder: string;
|
|
216
|
+
checkAll: string;
|
|
217
|
+
} | undefined;
|
|
218
|
+
InputPicker?: {
|
|
219
|
+
newItem: string;
|
|
220
|
+
createOption: string;
|
|
221
|
+
noResultsText: string;
|
|
222
|
+
placeholder: string;
|
|
223
|
+
searchPlaceholder: string;
|
|
224
|
+
checkAll: string;
|
|
225
|
+
} | undefined;
|
|
226
|
+
TagPicker?: {
|
|
227
|
+
newItem: string;
|
|
228
|
+
createOption: string;
|
|
229
|
+
noResultsText: string;
|
|
230
|
+
placeholder: string;
|
|
231
|
+
searchPlaceholder: string;
|
|
232
|
+
checkAll: string;
|
|
233
|
+
} | undefined;
|
|
234
|
+
Uploader?: {
|
|
235
|
+
inited: string;
|
|
236
|
+
progress: string;
|
|
237
|
+
error: string;
|
|
238
|
+
complete: string;
|
|
239
|
+
emptyFile: string;
|
|
240
|
+
upload: string;
|
|
241
|
+
removeFile: string;
|
|
242
|
+
} | undefined;
|
|
243
|
+
CloseButton?: {
|
|
244
|
+
closeLabel: string;
|
|
245
|
+
} | undefined;
|
|
246
|
+
Breadcrumb?: {
|
|
247
|
+
expandText: string;
|
|
248
|
+
} | undefined;
|
|
249
|
+
Toggle?: {
|
|
250
|
+
on: string;
|
|
251
|
+
off: string;
|
|
252
|
+
} | undefined;
|
|
253
|
+
}>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.CustomContext = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var CustomContext = exports.CustomContext = /*#__PURE__*/_react.default.createContext({});
|