@cloudtower/eagle 0.33.18 → 0.33.20

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 (27) hide show
  1. package/dist/cjs/core/BasicCTError/BasicCTError.style.js +5 -0
  2. package/dist/cjs/core/{CTModalFooterError → BasicCTError}/index.js +4 -10
  3. package/dist/cjs/coreX/DateRangePicker/Calendar.js +2 -2
  4. package/dist/cjs/coreX/DateRangePicker/utils.js +5 -0
  5. package/dist/cjs/index.js +2 -2
  6. package/dist/cjs/stats1.html +1 -1
  7. package/dist/components.css +1861 -1857
  8. package/dist/esm/core/BasicCTError/BasicCTError.style.js +3 -0
  9. package/dist/esm/core/{CTModalFooterError → BasicCTError}/index.js +4 -10
  10. package/dist/esm/coreX/DateRangePicker/Calendar.js +2 -2
  11. package/dist/esm/coreX/DateRangePicker/utils.js +3 -0
  12. package/dist/esm/index.js +1 -1
  13. package/dist/esm/stats1.html +1 -1
  14. package/dist/linaria.merged.scss +1880 -1876
  15. package/dist/src/core/BasicCTError/BasicCTError.style.d.ts +1 -0
  16. package/dist/src/core/{CTModalFooterError/CTModalFooterError.type.d.ts → BasicCTError/BasicCTError.type.d.ts} +3 -3
  17. package/dist/src/core/BasicCTError/index.d.ts +3 -0
  18. package/dist/src/core/index.d.ts +1 -1
  19. package/dist/src/coreX/DateRangePicker/__tests__/utils.test.d.ts +1 -0
  20. package/dist/src/coreX/DateRangePicker/utils.d.ts +7 -0
  21. package/dist/stories/docs/core/{CTModalFooterError.stories.d.ts → BasicCTError.stories.d.ts} +4 -4
  22. package/dist/style.css +1690 -1687
  23. package/package.json +4 -4
  24. package/dist/cjs/core/CTModalFooterError/CTModalFooterError.style.js +0 -5
  25. package/dist/esm/core/CTModalFooterError/CTModalFooterError.style.js +0 -3
  26. package/dist/src/core/CTModalFooterError/CTModalFooterError.style.d.ts +0 -1
  27. package/dist/src/core/CTModalFooterError/index.d.ts +0 -3
@@ -0,0 +1,3 @@
1
+ const BasicCTErrorStyle = "E_b1jaupqb";
2
+
3
+ export { BasicCTErrorStyle };
@@ -1,6 +1,6 @@
1
1
  import React__default, { useMemo } from 'react';
2
2
  import { cx } from '@linaria/core';
3
- import { CTModalFooterErrorStyle } from './CTModalFooterError.style.js';
3
+ import { BasicCTErrorStyle } from './BasicCTError.style.js';
4
4
  import { Typo } from '../Typo/index.js';
5
5
  import { useCTErrorMsg } from '../../hooks/useCTErrorMsg.js';
6
6
  import useParrotTranslation from '../../hooks/useParrotTranslation.js';
@@ -9,15 +9,9 @@ const defaultErrorContainerRender = ({
9
9
  children,
10
10
  className
11
11
  }) => {
12
- return /* @__PURE__ */ React__default.createElement(
13
- "span",
14
- {
15
- className: cx(Typo.Label.l3_regular, CTModalFooterErrorStyle, className)
16
- },
17
- children
18
- );
12
+ return /* @__PURE__ */ React__default.createElement("span", { className: cx(Typo.Label.l3_regular, BasicCTErrorStyle, className) }, children);
19
13
  };
20
- const CTModalFooterError = (props) => {
14
+ const BasicCTError = (props) => {
21
15
  const {
22
16
  error,
23
17
  className,
@@ -37,4 +31,4 @@ const CTModalFooterError = (props) => {
37
31
  return /* @__PURE__ */ React__default.createElement(ContainerRender, { className, errorMsgs: msgs, children: child });
38
32
  };
39
33
 
40
- export { CTModalFooterError };
34
+ export { BasicCTError };
@@ -11,6 +11,7 @@ import dayjs from 'dayjs';
11
11
  import React__default, { useState, useEffect, useRef } from 'react';
12
12
  import { getDiffMonthAndDate, getTime, checkDateNotInRange, getClassNameForDateBlock } from './common.js';
13
13
  import { CalendarStyle } from './DateRangePicker.style.js';
14
+ import { getFirstDateOfMonth } from './utils.js';
14
15
  import { getCalendarTitle } from '../common/getCalendarTitle.js';
15
16
 
16
17
  const Year = (props) => {
@@ -203,11 +204,10 @@ const Month = (props) => {
203
204
  const time = dayjs(`${year}-${month2}`, "YYYY-M");
204
205
  const allDateInMonth = time.daysInMonth();
205
206
  const dates = new Array(allDateInMonth).fill(1).map((value, index) => index + 1);
206
- const firstDateOfDay = time.set("date", dates[0]).day();
207
207
  monthAndDate.push({
208
208
  month: month2,
209
209
  dates,
210
- firstDateOfDay: Math.max(firstDateOfDay - 1, 0)
210
+ firstDateOfDay: getFirstDateOfMonth(time)
211
211
  });
212
212
  }
213
213
  setMonth(monthAndDate);
@@ -0,0 +1,3 @@
1
+ const getFirstDateOfMonth = (date, weekStartOnMonday = true) => (date.set("date", 1).day() - Number(weekStartOnMonday) + 7) % 7;
2
+
3
+ export { getFirstDateOfMonth };
package/dist/esm/index.js CHANGED
@@ -84,7 +84,7 @@ export { CascaderDefaultHeader, CascaderDefaultHeaderContainer, CascaderDefaultH
84
84
  export { CascaderDoubleRowOption, CascaderOptionWithCount, NotDataContent, PresetCascaderHeader, PresetCascaderRender, defaultTagRender } from './core/Cascader/cascader.widget.js';
85
85
  export { Cascader } from './core/Cascader/index.js';
86
86
  export { ConfigProvider, useConfig } from './core/ConfigProvider/index.js';
87
- export { CTModalFooterError } from './core/CTModalFooterError/index.js';
87
+ export { BasicCTError } from './core/BasicCTError/index.js';
88
88
  export { default as ExpandableContainer } from './core/ExpandableList/ExpandableContainer.js';
89
89
  export { default as ExpandableItem } from './core/ExpandableList/ExpandableItem.js';
90
90
  export { default as ExpandIcon } from './core/ExpandableList/ExpandIcon.js';