rsuite 5.70.0 → 5.70.2

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 (51) hide show
  1. package/Breadcrumb/styles/index.css +16 -0
  2. package/Breadcrumb/styles/index.less +10 -0
  3. package/CHANGELOG.md +19 -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/Form/Form.js +1 -1
  12. package/cjs/Form/hooks/useFormValidate.js +20 -3
  13. package/cjs/Form/hooks/useSchemaModel.d.ts +1 -1
  14. package/cjs/Form/hooks/useSchemaModel.js +61 -8
  15. package/cjs/FormControl/hooks/useField.js +4 -0
  16. package/cjs/internals/types/index.d.ts +14 -0
  17. package/cjs/internals/utils/ReactChildren.d.ts +11 -0
  18. package/cjs/internals/utils/ReactChildren.js +22 -0
  19. package/cjs/locales/index.d.ts +4 -1
  20. package/dist/rsuite-no-reset-rtl.css +16 -0
  21. package/dist/rsuite-no-reset-rtl.min.css +1 -1
  22. package/dist/rsuite-no-reset-rtl.min.css.map +1 -1
  23. package/dist/rsuite-no-reset.css +16 -0
  24. package/dist/rsuite-no-reset.min.css +1 -1
  25. package/dist/rsuite-no-reset.min.css.map +1 -1
  26. package/dist/rsuite-rtl.css +16 -0
  27. package/dist/rsuite-rtl.min.css +1 -1
  28. package/dist/rsuite-rtl.min.css.map +1 -1
  29. package/dist/rsuite.css +16 -0
  30. package/dist/rsuite.js +10 -10
  31. package/dist/rsuite.min.css +1 -1
  32. package/dist/rsuite.min.css.map +1 -1
  33. package/dist/rsuite.min.js +1 -1
  34. package/dist/rsuite.min.js.map +1 -1
  35. package/esm/Breadcrumb/Breadcrumb.d.ts +14 -4
  36. package/esm/Breadcrumb/Breadcrumb.js +32 -34
  37. package/esm/Breadcrumb/BreadcrumbItem.d.ts +20 -0
  38. package/esm/Breadcrumb/BreadcrumbItem.js +13 -17
  39. package/esm/Button/Button.js +4 -4
  40. package/esm/Calendar/TableRow.js +6 -2
  41. package/esm/CustomProvider/CustomProvider.d.ts +60 -9
  42. package/esm/Form/Form.js +1 -1
  43. package/esm/Form/hooks/useFormValidate.js +20 -3
  44. package/esm/Form/hooks/useSchemaModel.d.ts +1 -1
  45. package/esm/Form/hooks/useSchemaModel.js +62 -9
  46. package/esm/FormControl/hooks/useField.js +4 -0
  47. package/esm/internals/types/index.d.ts +14 -0
  48. package/esm/internals/utils/ReactChildren.d.ts +11 -0
  49. package/esm/internals/utils/ReactChildren.js +21 -0
  50. package/esm/locales/index.d.ts +4 -1
  51. package/package.json +1 -1
@@ -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;