rsuite 5.70.0 → 5.70.1

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 (41) hide show
  1. package/Breadcrumb/styles/index.css +16 -0
  2. package/Breadcrumb/styles/index.less +10 -0
  3. package/CHANGELOG.md +10 -0
  4. package/cjs/Breadcrumb/Breadcrumb.d.ts +14 -4
  5. package/cjs/Breadcrumb/Breadcrumb.js +30 -32
  6. package/cjs/Breadcrumb/BreadcrumbItem.d.ts +20 -0
  7. package/cjs/Breadcrumb/BreadcrumbItem.js +13 -17
  8. package/cjs/Button/Button.js +3 -3
  9. package/cjs/Calendar/TableRow.js +6 -2
  10. package/cjs/CustomProvider/CustomProvider.d.ts +60 -9
  11. package/cjs/internals/types/index.d.ts +14 -0
  12. package/cjs/internals/utils/ReactChildren.d.ts +11 -0
  13. package/cjs/internals/utils/ReactChildren.js +22 -0
  14. package/cjs/locales/index.d.ts +4 -1
  15. package/dist/rsuite-no-reset-rtl.css +16 -0
  16. package/dist/rsuite-no-reset-rtl.min.css +1 -1
  17. package/dist/rsuite-no-reset-rtl.min.css.map +1 -1
  18. package/dist/rsuite-no-reset.css +16 -0
  19. package/dist/rsuite-no-reset.min.css +1 -1
  20. package/dist/rsuite-no-reset.min.css.map +1 -1
  21. package/dist/rsuite-rtl.css +16 -0
  22. package/dist/rsuite-rtl.min.css +1 -1
  23. package/dist/rsuite-rtl.min.css.map +1 -1
  24. package/dist/rsuite.css +16 -0
  25. package/dist/rsuite.js +10 -10
  26. package/dist/rsuite.min.css +1 -1
  27. package/dist/rsuite.min.css.map +1 -1
  28. package/dist/rsuite.min.js +1 -1
  29. package/dist/rsuite.min.js.map +1 -1
  30. package/esm/Breadcrumb/Breadcrumb.d.ts +14 -4
  31. package/esm/Breadcrumb/Breadcrumb.js +32 -34
  32. package/esm/Breadcrumb/BreadcrumbItem.d.ts +20 -0
  33. package/esm/Breadcrumb/BreadcrumbItem.js +13 -17
  34. package/esm/Button/Button.js +4 -4
  35. package/esm/Calendar/TableRow.js +6 -2
  36. package/esm/CustomProvider/CustomProvider.d.ts +60 -9
  37. package/esm/internals/types/index.d.ts +14 -0
  38. package/esm/internals/utils/ReactChildren.d.ts +11 -0
  39. package/esm/internals/utils/ReactChildren.js +21 -0
  40. package/esm/locales/index.d.ts +4 -1
  41. package/package.json +1 -1
@@ -36,9 +36,25 @@
36
36
  color: #717273;
37
37
  color: var(--rs-text-secondary);
38
38
  }
39
+ .rs-breadcrumb ol {
40
+ display: -webkit-box;
41
+ display: -ms-flexbox;
42
+ display: flex;
43
+ -ms-flex-wrap: wrap;
44
+ flex-wrap: wrap;
45
+ list-style: none;
46
+ padding: 0;
47
+ margin: 0;
48
+ }
39
49
  .rs-breadcrumb-item {
40
50
  -webkit-transition: color 0.3s linear;
41
51
  transition: color 0.3s linear;
52
+ display: -webkit-box;
53
+ display: -ms-flexbox;
54
+ display: flex;
55
+ -webkit-box-align: center;
56
+ -ms-flex-align: center;
57
+ align-items: center;
42
58
  }
43
59
  .rs-breadcrumb-item:focus {
44
60
  outline: 0;
@@ -9,9 +9,19 @@
9
9
  font-size: @breadcrumb-font-size;
10
10
  color: var(--rs-text-secondary);
11
11
 
12
+ ol {
13
+ display: flex;
14
+ flex-wrap: wrap;
15
+ list-style: none;
16
+ padding: 0;
17
+ margin: 0;
18
+ }
19
+
12
20
  // If breadcrumbs has a ci
13
21
  &-item {
14
22
  transition: color 0.3s linear;
23
+ display: flex;
24
+ align-items: center;
15
25
 
16
26
  &:focus {
17
27
  .tab-focus();
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## [5.70.1](https://github.com/rsuite/rsuite/compare/v5.70.0...v5.70.1) (2024-09-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **Breadcrumb:** fix the rendering exception of the child node separator ([#3948](https://github.com/rsuite/rsuite/issues/3948)) ([7d54cc9](https://github.com/rsuite/rsuite/commit/7d54cc97b05e9b17797ad275b6f02ce679869579))
7
+ * **Calendar:** fix the problem of displaying the first week of the year incorrectly ([#3951](https://github.com/rsuite/rsuite/issues/3951)) ([a2c6891](https://github.com/rsuite/rsuite/commit/a2c6891f76cc5e435eb1980f9176dbec21ac5735))
8
+
9
+
10
+
1
11
  # [5.70.0](https://github.com/rsuite/rsuite/compare/v5.69.0...v5.70.0) (2024-08-24)
2
12
 
3
13
 
@@ -3,17 +3,27 @@ import BreadcrumbItem from './BreadcrumbItem';
3
3
  import { WithAsProps, RsRefForwardingComponent } from '../internals/types';
4
4
  import { BreadcrumbLocale } from '../locales';
5
5
  export interface BreadcrumbProps extends WithAsProps {
6
- /** Shorthand for primary content of the React.ReactNode */
6
+ /**
7
+ * The separator between each breadcrumb item.
8
+ */
7
9
  separator?: React.ReactNode;
8
10
  /**
9
11
  * Set the maximum number of breadcrumbs to display.
10
12
  * When there are more than the maximum number,
11
13
  * only the first and last will be shown, with an ellipsis in between.
12
- * */
14
+ */
13
15
  maxItems?: number;
14
- /** Custom locale */
16
+ /**
17
+ * The locale of the component.
18
+ */
15
19
  locale?: BreadcrumbLocale;
16
- /** A function to be called when you are in the collapsed view and click the ellipsis. */
20
+ /**
21
+ * The ellipsis element.
22
+ */
23
+ ellipsis?: React.ReactNode;
24
+ /**
25
+ * Callback function for clicking the ellipsis.
26
+ */
17
27
  onExpand?: (event: React.MouseEvent) => void;
18
28
  }
19
29
  export interface BreadcrumbComponent extends RsRefForwardingComponent<'ol', BreadcrumbProps> {
@@ -5,16 +5,21 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  exports.__esModule = true;
6
6
  exports.default = void 0;
7
7
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
8
- var _taggedTemplateLiteralLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteralLoose"));
9
8
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
10
9
  var _react = _interopRequireWildcard(require("react"));
11
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
12
11
  var _hooks = require("../internals/hooks");
12
+ var _utils = require("../internals/utils");
13
13
  var _BreadcrumbItem = _interopRequireDefault(require("./BreadcrumbItem"));
14
- var _templateObject;
15
- var _excluded = ["as", "className", "classPrefix", "children", "maxItems", "separator", "locale", "onExpand"];
14
+ var _excluded = ["as", "className", "classPrefix", "children", "ellipsis", "maxItems", "separator", "locale", "onExpand"];
16
15
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
17
16
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
+ var Separator = (0, _utils.createComponent)({
18
+ name: 'BreadcrumbSeparator',
19
+ componentAs: 'span',
20
+ 'aria-hidden': true
21
+ });
22
+
18
23
  /**
19
24
  * The Breadcrumb component is used to indicate the current page location and navigate.
20
25
  * @see https://rsuitejs.com/components/breadcrumb
@@ -26,6 +31,8 @@ var Breadcrumb = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
26
31
  _props$classPrefix = props.classPrefix,
27
32
  classPrefix = _props$classPrefix === void 0 ? 'breadcrumb' : _props$classPrefix,
28
33
  children = props.children,
34
+ _props$ellipsis = props.ellipsis,
35
+ ellipsis = _props$ellipsis === void 0 ? '...' : _props$ellipsis,
29
36
  _props$maxItems = props.maxItems,
30
37
  maxItems = _props$maxItems === void 0 ? 5 : _props$maxItems,
31
38
  _props$separator = props.separator,
@@ -35,62 +42,53 @@ var Breadcrumb = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
35
42
  rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
36
43
  var _useClassNames = (0, _hooks.useClassNames)(classPrefix),
37
44
  merge = _useClassNames.merge,
38
- prefix = _useClassNames.prefix,
39
45
  withClassPrefix = _useClassNames.withClassPrefix;
40
46
  var _useState = (0, _react.useState)(true),
41
- ellipsis = _useState[0],
42
- setEllipsis = _useState[1];
47
+ showEllipsis = _useState[0],
48
+ setShowEllipsis = _useState[1];
43
49
  var _useCustom = (0, _hooks.useCustom)('Breadcrumb', overrideLocale),
44
50
  locale = _useCustom.locale;
45
- var renderSeparator = function renderSeparator(key) {
46
- return /*#__PURE__*/_react.default.createElement("span", {
47
- key: "breadcrumb-separator-" + key,
48
- "aria-hidden": true,
49
- className: prefix(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2.default)(["separator"])))
50
- }, separator);
51
- };
52
- var handleClickEllipsis = (0, _react.useCallback)(function (event) {
53
- setEllipsis(false);
51
+ var handleClickEllipsis = (0, _hooks.useEventCallback)(function (event) {
52
+ setShowEllipsis(false);
54
53
  onExpand === null || onExpand === void 0 ? void 0 : onExpand(event);
55
- }, [onExpand]);
56
- var items = [];
57
- var count = _react.default.Children.count(children);
58
- if (count) {
59
- _react.default.Children.forEach(children, function (item, index) {
60
- items.push(item);
61
- if (index < count - 1) {
62
- items.push(renderSeparator(index));
63
- }
54
+ });
55
+ var content = (0, _react.useMemo)(function () {
56
+ var count = _utils.ReactChildren.count(children);
57
+ var items = _utils.ReactChildren.mapCloneElement(children, function (item, index) {
58
+ var isLast = index === count - 1;
59
+ return (0, _extends2.default)({}, item.props, {
60
+ separator: isLast ? null : /*#__PURE__*/_react.default.createElement(Separator, null, separator)
61
+ });
64
62
  });
65
- }
66
- var renderCollapseItems = function renderCollapseItems() {
67
- if (count > maxItems && count > 2 && ellipsis) {
68
- return [].concat(items.slice(0, 2), [[/*#__PURE__*/_react.default.createElement(_BreadcrumbItem.default, {
63
+ if (count > maxItems && count > 2 && showEllipsis) {
64
+ return [].concat(items.slice(0, 1), [[/*#__PURE__*/_react.default.createElement(_BreadcrumbItem.default, {
69
65
  role: "button",
70
66
  key: "ellipsis",
71
67
  title: locale.expandText,
72
68
  "aria-label": locale.expandText,
69
+ separator: /*#__PURE__*/_react.default.createElement(Separator, null, separator),
73
70
  onClick: handleClickEllipsis
74
71
  }, /*#__PURE__*/_react.default.createElement("span", {
75
72
  "aria-hidden": true
76
- }, "..."))]], items.slice(items.length - 2, items.length));
73
+ }, ellipsis))]], items.slice(items.length - 1, items.length));
77
74
  }
78
75
  return items;
79
- };
76
+ }, [children, ellipsis, handleClickEllipsis, locale.expandText, maxItems, separator, showEllipsis]);
80
77
  var classes = merge(className, withClassPrefix());
81
78
  return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, rest, {
82
79
  ref: ref,
83
80
  className: classes
84
- }), renderCollapseItems());
81
+ }), /*#__PURE__*/_react.default.createElement("ol", null, content));
85
82
  });
86
83
  Breadcrumb.Item = _BreadcrumbItem.default;
87
84
  Breadcrumb.displayName = 'Breadcrumb';
88
85
  Breadcrumb.propTypes = {
89
- separator: _propTypes.default.node,
90
86
  as: _propTypes.default.elementType,
91
87
  children: _propTypes.default.node,
92
88
  className: _propTypes.default.string,
93
89
  classPrefix: _propTypes.default.string,
90
+ ellipsis: _propTypes.default.node,
91
+ separator: _propTypes.default.node,
94
92
  maxItems: _propTypes.default.number,
95
93
  onExpand: _propTypes.default.func
96
94
  };
@@ -1,10 +1,30 @@
1
1
  import React from 'react';
2
2
  import { WithAsProps, RsRefForwardingComponent } from '../internals/types';
3
3
  export interface BreadcrumbItemProps extends WithAsProps<React.ElementType | string> {
4
+ /**
5
+ * The wrapper element of the BreadcrumbItem.
6
+ */
7
+ wrapperAs?: React.ElementType;
8
+ /**
9
+ * The active state of the BreadcrumbItem.
10
+ */
4
11
  active?: boolean;
12
+ /**
13
+ * The href attribute specifies the URL of the page the link goes to.
14
+ */
5
15
  href?: string;
16
+ /**
17
+ * The title attribute specifies extra information about an element.
18
+ */
6
19
  title?: string;
20
+ /**
21
+ * The target attribute specifies where to open the linked document.
22
+ */
7
23
  target?: string;
24
+ /**
25
+ * The separator between each breadcrumb item.
26
+ */
27
+ separator?: React.ReactNode;
8
28
  }
9
29
  /**
10
30
  * The `<Breadcrumb.Item>` component is used to specify each section of the Breadcrumb.
@@ -10,15 +10,17 @@ var _react = _interopRequireDefault(require("react"));
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
  var _SafeAnchor = _interopRequireDefault(require("../SafeAnchor"));
12
12
  var _hooks = require("../internals/hooks");
13
- var _excluded = ["as", "href", "classPrefix", "title", "target", "className", "style", "active", "children"];
13
+ var _excluded = ["wrapperAs", "href", "as", "classPrefix", "title", "target", "className", "style", "active", "children", "separator"];
14
14
  /**
15
15
  * The `<Breadcrumb.Item>` component is used to specify each section of the Breadcrumb.
16
16
  * @see https://rsuitejs.com/components/breadcrumb
17
17
  */
18
18
  var BreadcrumbItem = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
19
- var _props$as = props.as,
20
- Component = _props$as === void 0 ? props.href ? _SafeAnchor.default : 'span' : _props$as,
19
+ var _props$wrapperAs = props.wrapperAs,
20
+ WrapperComponent = _props$wrapperAs === void 0 ? 'li' : _props$wrapperAs,
21
21
  href = props.href,
22
+ _props$as = props.as,
23
+ Component = _props$as === void 0 ? href ? _SafeAnchor.default : 'span' : _props$as,
22
24
  _props$classPrefix = props.classPrefix,
23
25
  classPrefix = _props$classPrefix === void 0 ? 'breadcrumb-item' : _props$classPrefix,
24
26
  title = props.title,
@@ -27,6 +29,7 @@ var BreadcrumbItem = /*#__PURE__*/_react.default.forwardRef(function (props, ref
27
29
  style = props.style,
28
30
  active = props.active,
29
31
  children = props.children,
32
+ separator = props.separator,
30
33
  rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
31
34
  var _useClassNames = (0, _hooks.useClassNames)(classPrefix),
32
35
  merge = _useClassNames.merge,
@@ -34,22 +37,15 @@ var BreadcrumbItem = /*#__PURE__*/_react.default.forwardRef(function (props, ref
34
37
  var classes = merge(className, withClassPrefix({
35
38
  active: active
36
39
  }));
37
- if (active) {
38
- return /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({
39
- ref: ref
40
- }, rest, {
41
- style: style,
42
- className: classes
43
- }), children);
44
- }
45
- return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, rest, {
40
+ return /*#__PURE__*/_react.default.createElement(WrapperComponent, (0, _extends2.default)({
41
+ style: style,
42
+ className: classes,
43
+ ref: ref
44
+ }, rest), active ? /*#__PURE__*/_react.default.createElement("span", null, children) : /*#__PURE__*/_react.default.createElement(Component, {
46
45
  href: href,
47
46
  title: title,
48
- target: target,
49
- ref: ref,
50
- style: style,
51
- className: classes
52
- }), children);
47
+ target: target
48
+ }, children), separator);
53
49
  });
54
50
  BreadcrumbItem.displayName = 'BreadcrumbItem';
55
51
  BreadcrumbItem.propTypes = {
@@ -55,7 +55,7 @@ var Button = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
55
55
  loading: loading,
56
56
  block: block
57
57
  }));
58
- var renderButtonContent = (0, _react.useCallback)(function () {
58
+ var buttonContent = (0, _react.useMemo)(function () {
59
59
  var spin = /*#__PURE__*/_react.default.createElement("span", {
60
60
  className: prefix(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2.default)(["spin"])))
61
61
  });
@@ -73,7 +73,7 @@ var Button = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
73
73
  "aria-disabled": disabled,
74
74
  disabled: disabled,
75
75
  className: classes
76
- }), renderButtonContent());
76
+ }), buttonContent);
77
77
  }
78
78
  var Component = as || 'button';
79
79
  var type = typeProp || (Component === 'button' ? 'button' : undefined);
@@ -85,7 +85,7 @@ var Button = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
85
85
  disabled: disabled,
86
86
  "aria-disabled": disabled,
87
87
  className: classes
88
- }), renderButtonContent());
88
+ }), buttonContent);
89
89
  });
90
90
  Button.displayName = 'Button';
91
91
  Button.propTypes = {
@@ -16,6 +16,7 @@ var _excluded = ["as", "className", "classPrefix", "weekendDate", "rowIndex"];
16
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var TableRow = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
19
+ var _locale$dateLocale$op, _locale$dateLocale;
19
20
  var _props$as = props.as,
20
21
  Component = _props$as === void 0 ? 'div' : _props$as,
21
22
  className = props.className,
@@ -100,10 +101,13 @@ var TableRow = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
100
101
  return days;
101
102
  };
102
103
  var classes = merge(className, prefix('row'));
104
+ var _ref3 = (_locale$dateLocale$op = locale === null || locale === void 0 ? 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
+ weekStartsOn = _ref3.weekStartsOn;
103
107
  var week = (0, _date.format)(weekendDate, isoWeek ? 'I' : 'w', {
104
108
  locale: locale === null || locale === void 0 ? void 0 : locale.dateLocale,
105
- firstWeekContainsDate: 4,
106
- weekStartsOn: weekStart
109
+ firstWeekContainsDate: firstWeekContainsDate,
110
+ weekStartsOn: weekStart || weekStartsOn
107
111
  });
108
112
  return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({}, rest, {
109
113
  ref: ref,
@@ -1,18 +1,67 @@
1
1
  import React from 'react';
2
- import type { Locale as DateFnsLocale } from 'date-fns';
3
2
  import { Locale } from '../locales';
4
3
  import { ToastContainerInstance } from '../toaster/ToastContainer';
4
+ import type { Locale as DateFnsLocale } from 'date-fns';
5
+ import type { DateFns } from '../internals/types';
5
6
  export interface FormatDateOptions {
7
+ /**
8
+ * The locale object that contains the language and formatting rules for the date.
9
+ */
6
10
  locale?: DateFnsLocale;
7
- weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
8
- firstWeekContainsDate?: number;
11
+ /**
12
+ * Defines which day of the week should be considered the start of the week.
13
+ *
14
+ * The value should be an integer from 0 to 6, where:
15
+ * - `0` represents Sunday,
16
+ * - `1` represents Monday,
17
+ * - `2` represents Tuesday,
18
+ * - `3` represents Wednesday,
19
+ * - `4` represents Thursday,
20
+ * - `5` represents Friday,
21
+ * - `6` represents Saturday.
22
+ *
23
+ * This option is important for functions that operate on weeks, such as calculating
24
+ * the start or end of a week, determining which week a date falls in, or generating
25
+ * calendar views. The default value varies depending on the locale, with Monday (`1`)
26
+ * being the default in most regions following ISO 8601, while Sunday (`0`) is often
27
+ * the default in regions like the United States.
28
+ */
29
+ weekStartsOn?: DateFns.Day;
30
+ /**
31
+ * `firstWeekContainsDate` is used to determine which week is considered the first week of the year.
32
+ *
33
+ * This option specifies the minimum day of January that must be included in the first week.
34
+ *
35
+ * The value can be set to:
36
+ * - `1`: The first week of the year must include January 1st.
37
+ * - `4`: The first week of the year must include January 4th, which is the default according to ISO 8601.
38
+ *
39
+ * The choice between `1` and `4` typically depends on the regional or business conventions for week numbering.
40
+ *
41
+ * Please note that this option only accepts `1` (Sunday) or `4` (Thursday), aligning with common international standards.
42
+ *
43
+ * For more detailed information, please refer to https://en.wikipedia.org/wiki/Week#Week_numbering.
44
+ */
45
+ firstWeekContainsDate?: DateFns.FirstWeekContainsDate;
46
+ /**
47
+ * If true, allows usage of the week-numbering year tokens `YY` and `YYYY`.
48
+ * See: https://date-fns.org/docs/Unicode-Tokens
49
+ **/
9
50
  useAdditionalWeekYearTokens?: boolean;
51
+ /**
52
+ * If true, allows usage of the day of year tokens `D` and `DD`.
53
+ * See: https://date-fns.org/docs/Unicode-Tokens
54
+ */
10
55
  useAdditionalDayOfYearTokens?: boolean;
11
56
  }
12
57
  export interface CustomValue<T = Locale> {
13
- /** Language configuration */
58
+ /**
59
+ * The locale object that contains the language and formatting rules for the date.
60
+ */
14
61
  locale: T;
15
- /** Support right-to-left */
62
+ /**
63
+ * Right-to-left text direction.
64
+ */
16
65
  rtl: boolean;
17
66
  /**
18
67
  * Return the formatted date string in the given format. The result may vary by locale.
@@ -26,7 +75,7 @@ export interface CustomValue<T = Locale> {
26
75
  * return format(date, formatStr, { locale: eo });
27
76
  * }
28
77
  *
29
- * */
78
+ */
30
79
  formatDate: (date: Date | number, format: string, options?: FormatDateOptions) => string;
31
80
  /**
32
81
  * Return the date parsed from string using the given format string.
@@ -40,13 +89,16 @@ export interface CustomValue<T = Locale> {
40
89
  * return parse(date, formatStr, new Date(), { locale: eo });
41
90
  * }
42
91
  *
43
- * */
92
+ */
44
93
  parseDate: (dateString: string, formatString: string, referenceDate?: Date | number, options?: FormatDateOptions) => Date;
45
94
  /**
46
95
  * A Map of toast containers
47
96
  */
48
97
  toasters?: React.MutableRefObject<Map<string, ToastContainerInstance>>;
49
- /** If true, the ripple effect is disabled. Affected components include: Button, Nav.Item, Pagination. */
98
+ /**
99
+ * If true, the ripple effect is disabled.
100
+ * Affected components include: Button, Nav.Item, Pagination.
101
+ */
50
102
  disableRipple?: boolean;
51
103
  }
52
104
  export interface CustomProviderProps<T = Locale> extends Partial<CustomValue<T>> {
@@ -68,7 +120,6 @@ declare const CustomContext: React.Context<CustomProviderProps<{
68
120
  } | undefined;
69
121
  Plaintext?: {
70
122
  unfilled: string;
71
- /** Support right-to-left */
72
123
  notSelected: string;
73
124
  notUploaded: string;
74
125
  } | undefined;
@@ -200,3 +200,17 @@ export type CursorPosition = {
200
200
  clientTop: number;
201
201
  clientLeft: number;
202
202
  };
203
+ export declare namespace DateFns {
204
+ /**
205
+ * FirstWeekContainsDate is used to determine which week is the first week of the year, based on what day the January, 1 is in that week.
206
+ * The day in that week can only be 1 (Monday) or 4 (Thursday).
207
+ * Please see https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system for more information.
208
+ */
209
+ type FirstWeekContainsDate = 1 | 4;
210
+ /**
211
+ * The day of the week type alias.
212
+ * Unlike the date (the number of days since the beginning of the month), which begins with 1 and is dynamic (can go up to 28, 30, or 31), the day starts with 0 and static (always ends at 6).
213
+ * Look at it as an index in an array where Sunday is the first element and Saturday is the last.
214
+ */
215
+ type Day = 0 | 1 | 2 | 3 | 4 | 5 | 6;
216
+ }
@@ -29,6 +29,13 @@ export declare function map(children: React.ReactNode, func: any, context?: any)
29
29
  * @returns An array of the cloned and modified child elements.
30
30
  */
31
31
  export declare function mapCloneElement(children: React.ReactNode, func: any, context?: any): any[];
32
+ /**
33
+ * Iterates over children that are in flat array form.
34
+ * @param children
35
+ * @param func
36
+ * @param context
37
+ */
38
+ export declare function forEach(children: React.ReactNode, func: any, context?: any): void;
32
39
  /**
33
40
  * Returns the number of children.
34
41
  * @param children - The children to count.
@@ -63,6 +70,10 @@ export declare const ReactChildren: {
63
70
  * Maps over the children and applies the given function to each child.
64
71
  */
65
72
  map: typeof map;
73
+ /**
74
+ * Iterates over children that are in flat array form.
75
+ */
76
+ forEach: typeof forEach;
66
77
  /**
67
78
  * Finds the first child that satisfies the given condition.
68
79
  */
@@ -7,6 +7,7 @@ exports.ReactChildren = void 0;
7
7
  exports.count = count;
8
8
  exports.default = void 0;
9
9
  exports.find = find;
10
+ exports.forEach = forEach;
10
11
  exports.isFragment = isFragment;
11
12
  exports.map = map;
12
13
  exports.mapCloneElement = mapCloneElement;
@@ -103,6 +104,23 @@ function mapCloneElement(children, func, context) {
103
104
  }, context);
104
105
  }
105
106
 
107
+ /**
108
+ * Iterates over children that are in flat array form.
109
+ * @param children
110
+ * @param func
111
+ * @param context
112
+ */
113
+ function forEach(children, func, context) {
114
+ var index = 0;
115
+ _react.default.Children.forEach(flatChildren(children), function (child) {
116
+ if (! /*#__PURE__*/_react.default.isValidElement(child)) {
117
+ return;
118
+ }
119
+ func.call(context, child, index);
120
+ index += 1;
121
+ });
122
+ }
123
+
106
124
  /**
107
125
  * Returns the number of children.
108
126
  * @param children - The children to count.
@@ -158,6 +176,10 @@ var ReactChildren = exports.ReactChildren = {
158
176
  * Maps over the children and applies the given function to each child.
159
177
  */
160
178
  map: map,
179
+ /**
180
+ * Iterates over children that are in flat array form.
181
+ */
182
+ forEach: forEach,
161
183
  /**
162
184
  * Finds the first child that satisfies the given condition.
163
185
  */
@@ -1,4 +1,5 @@
1
1
  import defaultLocale from './default';
2
+ import { Locale as DateFnsLocale } from 'date-fns';
2
3
  export { default as arEG } from './ar_EG';
3
4
  export { default as daDK } from './da_DK';
4
5
  export { default as deDE } from './de_DE';
@@ -29,7 +30,6 @@ type PickKeys<T> = {
29
30
  };
30
31
  export type Locale = PickKeys<typeof defaultLocale>;
31
32
  export type CommonLocale = typeof defaultLocale.common;
32
- export type CalendarLocale = PickKeys<typeof defaultLocale.Calendar>;
33
33
  export type PlaintextLocale = PickKeys<typeof defaultLocale.Plaintext>;
34
34
  export type PaginationLocale = PickKeys<typeof defaultLocale.Pagination>;
35
35
  export type TableLocale = CommonLocale;
@@ -41,3 +41,6 @@ export type UploaderLocale = PickKeys<typeof defaultLocale.Uploader> & CommonLoc
41
41
  export type CloseButtonLocale = PickKeys<typeof defaultLocale.CloseButton>;
42
42
  export type BreadcrumbLocale = PickKeys<typeof defaultLocale.Breadcrumb>;
43
43
  export type ToggleLocale = PickKeys<typeof defaultLocale.Toggle>;
44
+ export interface CalendarLocale extends PickKeys<typeof defaultLocale.Calendar> {
45
+ dateLocale?: DateFnsLocale;
46
+ }
@@ -1800,9 +1800,25 @@ tbody.rs-anim-collapse.rs-anim-in {
1800
1800
  color: #717273;
1801
1801
  color: var(--rs-text-secondary);
1802
1802
  }
1803
+ .rs-breadcrumb ol {
1804
+ display: -webkit-box;
1805
+ display: -ms-flexbox;
1806
+ display: flex;
1807
+ -ms-flex-wrap: wrap;
1808
+ flex-wrap: wrap;
1809
+ list-style: none;
1810
+ padding: 0;
1811
+ margin: 0;
1812
+ }
1803
1813
  .rs-breadcrumb-item {
1804
1814
  -webkit-transition: color 0.3s linear;
1805
1815
  transition: color 0.3s linear;
1816
+ display: -webkit-box;
1817
+ display: -ms-flexbox;
1818
+ display: flex;
1819
+ -webkit-box-align: center;
1820
+ -ms-flex-align: center;
1821
+ align-items: center;
1806
1822
  }
1807
1823
  .rs-breadcrumb-item:focus {
1808
1824
  outline: 0;